Robin van Persie scored his 17th Premier League goal as United were on course to their 19th win this season. But Spurs kept pushing forward for the equaliser, with Dempsey netting the crucial goal with only seconds remaining on the clock.
United are now five points above rivals Manchester City after Roberto Mancini's men beat Fulham on Saturday.
Spurs were second best against the league leaders after going down in the 25th minute. Van Persie headed home Tom Cleverley's cross to put United in front and from then on the visitors dominated the match.
Gunners hit back after surrendering two goals in the first half through Theo Walcott's striker just before the hour mark. Chelsea were ahead comfortably after Juan Mata opened the scoring and Frank Lampard converted a penalty, his 195th goal for the club, ultimately proving the difference.
Arsenal are currently seven points below London rivals Tottenham and in danger of losing out on Champions league places as they equal in points with Liverpool and West Brom Albion at 34 points.
However, the London derby was not without controversy. Arsene Wenger was furious with the hosts opening goal. Francis Coquelin was clearly fouled by Ramirez but Chelsea took advantage with Cesar Azpilicueta's long pass meeting Mata, who smashed the ball over Wojciech Szczesny.
The Blues doubled their lead 10 minutes later as Mata found Ramirez free inside the box. The Brazilian tried to skip past Szczesny but went down too easily. Frank Lampard stepped up and gave the Blues a two-goal advantage within 16 minutes.