Manchester United moved four points clear of Liverpool in second place after Rio Ferdinand's last-gasp goal.
Man Utd's players celebrate Ferdinand's match-winning header
Ferdinand leapt highest in a crowded penalty area to power a header past Jose Reina from a Ryan Giggs free-kick.
Liverpool will have regrets, given their dominance of the game, with Djibril Cisse missing an open goal just past the hour when he lashed over.
And in the first half Peter Crouch's powerful shot was well blocked by Wes Brown, who threw himself at the ball.
United's injury problems and Cristiano Ronaldo's suspension led to Giggs being deployed in central midfield alongside John O'Shea.
That partnership never quite gelled and, with Liverpool controlling the midfield, Sir Alex Ferguson withdrew O'Shea at the interval and replaced him with striker Louis Saha.
Saha's introduction meant Darren Fletcher was moved into the middle alongside Giggs.
Even that switch failed to alter the midfield balance and Liverpool continued to create the clearer chances.
Giggs made United's best opportunity of the first half, his pass releasing Ruud van Nistelrooy, although the Dutchman's shot was comfortably saved by Reina.
But it was symptomatic of Liverpool's control that the chance arrived in first-half stoppage time and United did not win a corner until the 87th minute.
As has happened so often this season, Steven Gerrard was at the centre of Liverpool's best attacking work.
After Harry Kewell had bravely won an aerial challenge, Gerrard surged towards the United goal only to screw his shot wide.
Gerrard then played the pass of the match, bending the ball with the outside of his right foot to release Cisse, who was unable to trouble Edwin van der Sar with a weak shot.
Cisse did better when he headed Mohamed Sissoko's chipped pass into the feet of Crouch, who hit a powerful half-volley which was well blocked by Wes Brown.
On 62 minutes Cisse should have given Liverpool the lead when he blasted over with the goal at his mercy.
The ball had broken to the Frenchman after Ferdinand was forced to hook the ball off the line following a mix-up with Van der Sar.
But United finished the game strongly and Wayne Rooney went close with a shot that zipped past the post.
England manager Sven-Goran Eriksson left his seat as the game looked to be heading for a draw but Ferdinand had the final say as he craned his neck to steer his header past Reina's despairing dive.
Gary Neville ran the length of the Old Trafford pitch to celebrate the winner in front of Liverpool's fans and could be in trouble with the Football Association.
Man Utd: Van der Sar, Neville, Ferdinand, Brown, Evra, Giggs, Fletcher, O'Shea (Saha 45), Richardson, Rooney, van Nistelrooy.
Subs Not Used: Howard, Vidic, Silvestre, Rossi.
Booked: Richardson, Rooney.
Goals: Ferdinand 90.
Liverpool: Reina, Finnan, Hyypia, Carragher, Riise, Gerrard, Alonso, Sissoko (Kromkamp 89), Kewell, Crouch (Morientes 59), Cisse (Sinama Pongolle 75).
Subs Not Used: Dudek, Traore.
Booked: Sissoko, Alonso, Gerrard.
Ref: M Riley (W Yorkshire).