Pedro Neto stunned Anfield with an early opener for the visitors, but Sadio Mane netted midway through the first half to haul his team level.
Amid unbearable tension, the Reds completed their comeback in the 84th minute thanks to Mohamed Salah's close-range finish and Andy Robertson rasped in a clinching third.
But Manchester City's own turnaround in a 3-2 victory against Aston Villa meant they held on to top spot and took the title for 2021-22.