Liverpool struck after less than 10 minutes when Alex Oxlade-Chamberlain surged forward from midfield to collect a neat layoff from Roberto Firmino and send a low shot past goalkeeper Ederson.
Leroy Sane equalised shortly before the interval, but Liverpool blew Manchester City away after halftime, with Firmino chipping Ederson to restore the home side’s lead.
Sadio Mane struck from the edge of the box to extend the lead, while Egypt international Mohamed Salah looked to have completed the rout with the fourth goal for Liverpool.
He had collected Ederson’s clearance and sent the ball sailing back over the stranded goalkeeper’s head.
But Manchester City substitute Bernardo Silva grabbed one back and midfielder Ilkay Gundogan prodded home in stoppage-time.
Manchester City’s first league defeat in 23 games this season left them 15 points clear at the top, ahead of Manchester United, Liverpool and Chelsea.
“Congratulations to Liverpool for the victory,” Manchester City manager Pep Guardiola said after the match.
“The game was in our hands at 1-1, but our finishing was not good and then it went suddenly to 4-1. You have to live this kind of situation in the season.
“The reality is we lost the game, but we have a week to recover and prepare for the Newcastle United game.
“But all credit to the opponents. We know how difficult it is against a Jurgen Klopp team, so aggressive, and at Anfield too. We did a good performance apart from a few minutes.
“In every press conference for the last few months, the media people have said that the Premier League is done and I have always said `No’. We will defend our position game by game.”
Against the runaway leaders, Liverpool started strongly at a raucous Anfield and their high pressing game was vindicated when Oxlade-Chamberlain surged forward and finished brilliantly.
In an entertaining match which produced chances at both ends, Manchester City began to assert themselves before a deserved equaliser.
Kyle Walker’s brilliant pass beat Joe Gomez and Sane, having controlled the ball superbly with his chest, fizzed a shot past Loris Karius’s weak attempted save at his near post.
The game continued at the same frantic pace after the break with chances for both sides.
Thereafter Liverpool, in one of the most irresistible attacking displays of the season, scored three times in nine blistering minutes.
Firmino lifted a deft finish over Ederson to restore their lead.
Then Mane — just seconds after curling a shot against the post — unleashed an unstoppable drive into the top corner with his left foot.
With Anfield in raptures and the visitors looking shell-shocked, Ederson’s attempted clearance only found Salah who controlled the ball before clipping it over the Brazilian from long range.
Late goals from substitute Silva and Gundogan set up a tense final few minutes but Manchester City’s revival came too late.(Reuters/NAN)