Two goals down from the first leg, Liverpool looked out for the count after veteran defender Jamie Carragher fluffed an attempted backpass and Brazilian Hulk slipped home the opener to make it 3-0 on aggregate for the visitors.
But Liverpool roared back with two goals from Luis Suarez with Joe Allen netting another in between, but the extra goal would not come as Zenit reached the last 16.
Liverpool manager Brendan Rodgers was defiant, saying: "We may have lost the battle tonight, but in terms of the war and going forward we're very much winning."
Deposed European champions Chelsea had to settle for a home draw against Sparta Prague having won the away leg 1-0 after Eden Hazard's late effort cancelled out David Lafata's opener.
Chelsea captain John Terry said: "We're delighted to go through, it wasn't our best performance but we're through and that's all that matters."
Aside from Liverpool's anguish it was a successful night for the English contingent with a last-gasp goal from Mousa Dembele booking a last 16 berth for Tottenham, a superlative strike rescuing a 3-2 aggregate win over French hosts Lyon after a 1-1 draw.
Spurs, who now face Inter Milan, had won the opening encounter 2-1 but trailed for much of the match to a 17th-minute goal from Maxime Gonalons before Dembele struck to save the Londoners from going the way of Liverpool.
Newcastle thanked Shola Ameobi's third European goal of the season, a penalty, for a 1-0 win at Metalist Kharkiv, the Ukrainians who held the Magpies to a goalless stalemate on Tyneside last week.
Newcastle were under the cosh for much of the match and Dutch keeper Tim Krul made several top drawer saves, before Ameobi struck on 64 minutes for a crucial away goal after keeper Olexandr Goryainov upended Moussa Sissoko.
The English side will face Russia's Anzhi Makhachkala for a quarter-final spot.
Spoiling matters for Tottenham was the fact that seven people had Wednesday night sustained minor injuries when visiting fans were attacked by a group of 50 masked men who burst into a Lyon bar throwing chairs and stones, local officials said.
Elsewhere, Russia's Rubin Kazan put out holders Atletico Madrid 2-1 on aggregate despite Falcao giving the Spaniards the win by the only goal on the night.
Inter, European Cup winners in 2010, went through after a 3-0 romp at 10-man Romanians Cluj, who had Mario Camora red-carded late on, for a 5-0 aggregate success.
Colombian star Fredy Guarin scored a brace for Inter with Marco Benassi adding the third.
Germany's Stuttgart won 2-0 at Belgium's Genk for a 3-1 aggregate win with Arthur Boka and Christian Gentner scoring for the Bundesliga side.
Italy's Lazio defeated German rivals Borussia Moenchengladbach 2-0 with Antonio Andreva and Alvaro Gonzalez the scorers in the first half as the Romans progressed 5-3 overall.