The Portuguese substitute struck in the fourth minute of added time, one minute after Tottenham substitute Richarlison thought he had earned his side an unlikely point.
Goals by Curtis Jones, Luis Diaz and Mohamed Salah put Liverpool 3-0 ahead inside the opening 15 minutes as Tottenham suffered a horrible case of deja-vu having conceded five in the opening 21 minutes of a 6-1 rout at Newcastle United a week ago.
But Tottenham hit back before halftime through Harry Kane and hit the woodwork three times before Son Heung-min set up a nerve-jangling finale and Richarlison flicked a downward header past Alisson in the third minute of stoppage time.
There was one final twist though as Jota latched on to a mistake by Lucas Moura and fired low past Fraser Forster to spark pandemonium on the touchline.
Liverpool manager Juergen Klopp appeared to pull his hamstring as he celebrated manically and was also shown a yellow card in the most bizarre of climaxes.
To make matters worse for Tottenham they felt Jota should have been red-carded for an earlier high boot that caught Oliver Skipp's head that was only punished with a yellow.
When heart rates returned to normal the table shows Liverpool now above Tottenham in fifth place with 56 points from 33 games, to Tottenham's 54 from 34.
Liverpool, who have won four games in a row, are not out of the battle for a top-four finish but are seven points behind fourth-placed Manchester United who have a game in hand and nine points behind third-placed Newcastle United who have played 33.
"Crazy. What a game. These are the games we love to play in. A fantastic ending to a game. Stuff you love to see to be honest," Liverpool's Trent Alexander-Arnold told Sky Sports.
"It's not so much relief it's just celebration. It's pushing to get the winner again. We go from disappointment to sheer joy in a matter of minutes. Outstanding way to win a game."
For Tottenham the mood was despair although after last week's diabolical display at Newcastle which cost interim manager Cristian Stellini his job, this time there was pride.
"To get back in the game and give them a goal is difficult to take," a devastated Ryan Mason, Tottenham's second stand-in manager since Antonio Conte was sacked, said.
"We were the better team by an absolute country mile. To gift a team like Liverpool four goals makes it difficult. It's tough to put it into words, absolutely gutted."
A chaotic first half was only three minutes old when Curtis Jones put the hosts in front from Alexander-Arnold's cross and two minutes later Diaz, making his first start since knee surgery, volleyed in Cody Gakpo's cut back.
When Cristian Romero needlessly fouled Gakpo in the 13th minute and Salah blasted a penalty high into the net Tottenham were on course for another horror show.
With some Spurs supporters leaving early and others chanting "we want our money back" the visitors came alive when Kane volleyed past Alisson from an Ivan Perisic cross in the 39th minute before Son curled a left-footed effort on to the post.
Tottenham cursed their bad luck after the break when Son and Romero saw efforts bounce off posts within the space of a couple of minutes but Son then glided on to Romero's pass in the 77th minute to finish with aplomb to set up the barnstorming finale.
'I got punished,' says Klopp after injuring himself celebrating winner
Liverpool manager Juergen Klopp celebrates after the match - Premier League - Liverpool v Tottenham Hotspur - Anfield, Liverpool, Britain - April 30, 2023. (Photo: Reuters) |
Liverpool manager Juergen Klopp is well-known for his exuberant goal celebrations and manic behaviour on the touchline but the German surpassed himself as his side claimed a thrilling 4-3 victory over Tottenham Hotspur.
Klopp was left in almost disbelief as his side, who had led 3-0 after 15 minutes, were pegged back to 3-3 when Tottenham's former Everton striker Richarlison headed past Alisson in the third minute of stoppage time.
One minute later, however, Diogo Jota scored Liverpool's winner and a delirious Klopp raced down the touchline before pulling up sharply with what looked like a hamstring injury.
He was also booked for his trouble.
"I'm not sure if it's the hamstring it could be the adductor but I got punished. Little sins immediately," Klopp said.
"The hamstring or whatever the muscle gave up in that moment. That's fair. Apart from that, all okay."
A fourth successive league win pushed Liverpool into fifth place although their hopes of a top-four finish are still slender as they trail Manchester United and Newcastle by seven and nine points respectively having also played a game more than Manchester United.
They seem well-placed to at least qualify for the Europa League, although Klopp would prefer that his side show more game-management than on Sunday when they inexplicably allowed a crumbling Tottenham side to come back.
"Second half the game is open because they started believing or kept believing," Klopp said of Sunday's clash.
"We opened the door for them and it looked like we pushed them through a little bit as well."
Asked whether his side can still gatecrash the top four, Klopp was dismissive and suggested that they still have to fear eighth-placed Brighton and Hove Albion who would be right in the mix for the top six if they win their games in hand.
"Of course not. If United and Newcastle wins all the games then how can we get there? If they start losing them we are close. Until then we have to win football games to qualify for Europe at all," Klopp said.
"Brighton played one of the best football games this weekend I've ever seen in my life, I have to say, Roberto De Zerbi, wow. Aston Villa are developing. If we can keep them behind us that will already be success."
Brighton beat Wolverhampton Wanderers 6-0 and are four points behind Liverpool with two games in hand.