Chelsea led through Gary Cahill's 60th-minute deflected shot but Sergio Aguero levelled the scores in the 78th with a penalty and Samir Nasri scored the winner seven minutes later following an exchange of passes with Carlos Tevez, who returned to action after six months away.
"When they scored, I think we didn't deserve to go behind," City manager Roberto Mancini said. "But we wanted, we desired to win this game.
"It's more than three points, this game."
Arsenal moved up to a season-high third place with a 1-0 win at Everton, with Tottenham slipping to fourth after a 1-1 draw with Stoke.
Queens Park Rangers scored three times in the last 14 minutes to overturn a 2-0 deficit and beat Liverpool 3-2.
Chelsea had won four straight under new coach Roberto Di Matteo but its opening goal came completely against the run of play. Ramires forced a corner on the right wing, City failed to clear the cross and Cahill pounced on the loose ball to hit a shot that bobbled off Yaya Toure to leave City goalkeeper Joe Hart stranded.
The goal prompted Mancini to introduce Tevez, who was on strike for some of the past six months following a dispute that began in September when he refused to warm up as a substitute in a Champions League match, as a 66th-minute substitute.
Tevez was met by a mix of cheers and jeers but Aguero soon equalized with his penalty after Pablo Zabaleta's shot ricocheted off Michael Essien's arm.
Tevez had a crucial part in the winning goal as his deft pass on the turn allowed Nasri to break into the box and lift a shot over goalkeeper Petr Cech.
"I am really happy for him," Nasri said. "He has showed great spirit and today showed he can be really important until the end of the season.
"It's good that it was him who gave the assist."
City has 69 points to United's 70 with nine games remaining. Arsenal is another 14 further back but finally above local rival Tottenham after Thomas Vermaelen headed in from Robin van Persie's corner to secure a sixth straight league win.
Spurs ended a three-game losing streak but is still a point behind Arsenal after Rafael van der Vaart headed an injury-time equalizer against Stoke.
Chelsea stayed in fifth place with 49 points.
Relegation-threatened QPR trailed to second-half goals by Sebastian Coates and Dirk Kuyt before Shaun Derry gave the home side hope with a 77th-minute header.
Former Liverpool striker Djibril Cisse levelled the scores nine minutes later before substitute Jamie Mackie slotted past goalkeeper Jose Reina to secure the west Londoners three points and hoist his side out of the relegation zone.Suggest a correction