Hulk's early away goal proved critical on Thursday as Zenit booked their place in the last 16, with Luis Suarez's two free-kicks and Joe Allen's strike not enough to complete a memorable comeback.
Liverpool started on the front foot, but found themselves behind after 19 minutes when Hulk capitalised on a terrible mistake from Jamie Carragher to stun the home fans.
There looked very little danger when Carragher collected the ball midway inside his own half but his attempted back pass towards Pepe Reina was terribly underhit, allowing Hulk to race clear and slide the ball under Reina and leaving Liverpool needing to score four goals if they were to progress.
Liverpool gave themselves hope on 28 minutes when Daniel Agger was felled on the edge of the box and Suarez drilled his free-kick low through the Zenit wall and into the net past Vyacheslav Malafeev.
Liverpool reduced the arrears in the tie and went in front on the night two minutes before the break, with Joe Allen finding the net.
Jose Enrique worked a neat one-two with Jordan Henderson before crossing for Allen, who saw his initial effort saved by Malafeev, but he was on hand to fire home the rebound from close-range.
Liverpool picked up where they left off at the start of the second half and they levelled the tie on aggregate just before the hour mark with a stunning free-kick from Suarez.
The Uruguayan curled his effort from 25 yards round the wall and into the top right-hand corner past a stunned Malafeev to send the home fans into raptures.
Liverpool went close to grabbing a fourth goal on 72 minutes when Malafeev flapped at a cross from Enrique and the ball dropped to Gerrard, who hit his shot into the ground and the ball bounced up goalwards only for Malafeev to produce a fine acrobatic save to turned the ball behind.
Reina kept Liverpool in the tie a minute later when he got down low to keep out Hulk's powerful effort from the edge of the box.
Liverpool threw everything at Zenit in the closing stages, but they could not find a fourth goal as they saw their European hopes ended in dramatic fashion.