Manchester City 1 Liverpool 0
Only seconds of normal time remained when Kiki Musampa struck the goal which earned City their first victory for new manager Stuart Pearce.
Until then the game had looked like ending in a gloomy goalless draw, one which would still have been sufficient for Liverpool to move ahead of Everton on goal difference.
But as has happened so often this season, Liverpool again failed to deliver after a Champions League fixture.
In the ten matches which have immediately followed Champions League games, Liverpool have won only twice.
And once again Liverpool disappointed only four days after their magnificent victory against Italian giants Juventus.
Liverpool manager Rafa Benitez was disappointed with his side's display, and in particular the manner of City's winning goal.
He said: "What was upsetting was that the goal came from our throw-in.
"I said before that we need to learn that if we cannot win we must draw and we had looked like doing so until then.
"It was important to win to continue to put Everton under pressure. We didn't play well in the first half when we lost the ball too easily.
"In the second period we started to control the game and Steven Gerrard had a clear opportunity to give us the lead."
Pearce was delighted to gain his first victory after three matches as City manager. He said: "It was probably poetic justice to score the winner in the last minute after we had been denied victory at Charlton last week so late in that game.
"I felt it was a 0-0, but the players stuck to their game plan and worked hard. And these things tend to even themselves out as we deserved three points last week.
"I am delighted for the players and it is a reward for their hard work and efforts over the last four or five weeks.
"It is a big scalp, as Liverpool have been on a good run. They played Juventus off the park for periods and dictated here at times.
"Our players showed they have the aptitude to stick to a game plan and that was very pleasing."
Liverpool made three changes from the starting line-up which faced Juventus.
Milan Baros was ruled out through suspension while Sami Hyypia and Djimi Traore stood down as cup-tied pair Mauricio Pellegrino and Fernando Morientes returned and there was also a call-up for Stephen Warnock.
City's one alteration from the side which drew 2-2 at Charlton saw Paul Bosvelt return in place of the injured Jon Macken.
Bosvelt was restored to the midfield with Antoine Sibierski pushed up alongside Robbie Fowler, the former Liverpool player was celebrating his 30th birthday.
In a cagey opening, it took until the 11th minute before either goalkeeper was extended and it was City who came close to taking the lead. Captain Sylvain Distin managed to get to Stephen Jordan's free-kick from the left, but his downward header was well kept out by teenage keeper Scott Carson diving low to his right.
Musampa for City and Liverpool's Anthony Le Tallec each had half chances but both snatched at their efforts and were unable to hit the target.
Igor Biscan forced City keeper David James into his first save of the match in the 33rd minute.
He dived smartly low to his left to keep out a long-range shot from the Croatian midfield player and then while still on the ground kicked away the loose ball as Le Tallec bore down ready to fire home for the rebound.
Liverpool's Jame Carragher became the first player to be booked by referee Mike Riley for a trip on Musampa.
Carson raced out of his goal to block at the feet of Sibierski as City could have stolen into the lead on the stroke of half-time.
Joey Barton joined Carragher in the book as he was cautioned in stoppage time for a late challenge on Le Tallec.
James and Carson were largely redundant in a dreary opening to the second period and neither side looked capable of breaking the stalemate.
City had a penalty appeal waived aside in the 62nd minute when Fowler went down after a challenge from Pellegrino, but television replays confirmed Riley was spot on as the City striker had clearly dived.
Musampa came within inches at putting City ahead midway through the half with a terrific volley which struck the upright with Carson beaten.
City brought on Danny Mills for Nedum Onuoha while Liverpool introduced Vladimir Smicer for Luis Garcia in a straight striking swap.
Pearce then sent on winger Lee Croft for Bosvelt to try and open up a Liverpool defence which had rarely been threatened.
Gerrard had a great chance to give Liverpool lead in the 82nd minute after being released on the right of the penalty area by Smicer's crossfield pass, but could only shoot into the sidenetting with only James to beat.
There was still no indication of the late drama in store until Musampa struck with only seconds of normal time remaining.
Croft pulled the ball back from the right and Musampa found the net with a terrific shot on the run from 12 yards low to the left of Carson.
And the goal brought enormous cheers from the crowd which had become increasingly frustrated as the afternoon had progressed.
With Liverpool committed to all-out attack, City came close to adding a second goal in stoppage time.
Substitute Bradley Wright-Phillips cut in past Carragher and fired just wide of the upright with Carson beaten.
Man of the Match: Claudio Reyna – The American international held City's midfield together and even managed to outshine Liverpool skipper Steven Gerrard.