Pep Guardiola’s side had taken the lead on the hour when substitute Jack Grealish made an instant impact from the bench by powering home a header.
But with 12 minutes to go, United drew level through Bruno Fernandes with the effort initially disallowed for offside only for ref Stuart Attwell to adjudge that Marcus Rashford who was in an offside position was not interfering with play.
And on 82 minutes United struck the winner as Rashford fired home from close range to set the seal on a hugely frustrating afternoon.
What happened
The 189th Manchester derby saw United come into the game on a run of eight consecutive wins across all competitions while City were looking to bounce back after our midweek Carabao Cup exit at Southampton.
With heavy overnight rain lending an extra zip and sheen to the Old Trafford pitch, there was a cagey start to the match as both sides probed and sought to impose their gameplan on proceedings.
With Fred deployed on a man-to-man marking mission against Kevin De Bruyne, space and time were even more congested.
A tactically absorbing contest saw City enjoyed the lion’s share of possession and territory in the first 45 minutes with United seeking to exploit their pace on the break.
The first opportunity fell the hosts way with Bruno Fernandes skewing an 11th minute shot wide of the target from the right-hand edge of the box.
It then needed a smart interception from Joao Cancelo to deny the onrushing Marcus Rashford in the heart of the box after a rapid United counter-attack.
At the other end, City’s first meaningful sight of goal fell Erling Haaland’s way on 24 minutes as the Premier League’s leading scorer swivelled onto a fine Bernardo ball on the right edge of box.
However, the Norwegian’s low shot was blocked by a desperate lunge from Casemiro.
At the other end Manuel Akanji then came to City’s rescue on 34 minutes after an error of judgment from Ederson.
The City keeper had come rushing out of his box to try and intercept a Fernandes ball to the advancing Rashford.
However, the United man was able to beat the keeper and then cut inside from the left side of the City box before firing in on goal.
Thankfully, Akanji was ever alert and had the presence of mind to block the England striker’s goal shot a yard out from goal.
Three minutes later Ederson then more than made amends as he produced a fine save to deny Rashford once again.
A smart Eriksen pass saw Rashford evade the City defence but as he powered in goal, Ederson got his timing and positioning to perfection, using his body to save the day as he blocked the United striker’s close range shot.
As half time approached, Kyle Walker came within a whisker of breaking the deadlock, the full-back’s 25-yard power drive whistling just past the right hand upright.
City were almost in eight minutes after the restart when De Bruyne was able to evade the shackles of Fred and power up the right side of the United half.
KDB picked out the waiting Bernardo inside the box but rather than head for goal, Silva sought to guide the ball to Phil Foden and United were able to clear their lines.
But with City adding an extra zip and intensity, you felt the ascendancy was heading our way.
And the big breakthrough arrived on the hour thanks to supersub Jack Grealish who made another instant impact, heading home just three minutes after having come on for Phil Foden.
As so often De Bruyne was the architect, the Belgian finding space and time on the right edge of the box to fire in an inviting cross.
And Grealish needed no second invitation to head home from close range and send the travelling City fans into ecstasy.
It looked the decisive moment - only for the game to turn on its head in the final furlong.
First, United drew level 11 minutes from time in controversial circumstances as Bruno Fernandes fired home from 15 yards with the effort initially being ruled out for offside.
Rashford who was in an offside position raced after the ball but didn’t touch it before Fernandes struck.
The lineman’s flag initially flagged for offside. But after conferring with his linesman, ref Stuart Attwell overruled the decision and awarded the goal with Rashford adjudged not to be interfering with play.
And within four minutes United had taken the lead.
Substitute Garnacho was the architect, finding space on the left wing before drilling in a low cross which Rashford rifled in.
There was more drama with City then appealing for a penalty after Casemiro tangled with Haaland as the Norwegian prepared to shoot but VAR ruled there was no foul.
And despite seeking to summon up a late response we couldn’t find the equaliser.
Assist specialist
Kevin De Bruyne’s latest assist meant the Belgian had reached double figures for assists in five different Premier League seasons, with only Cesc Fabregas (six) doing so in more different campaigns in the competition’s history.
Further evidence as if any were needed of De Bruyne’s amazing quality and consistency.
Teams
UNITED: De Gea, Wan-Bissaka, Shaw, Varane, Malacia (Martinez 93), Fred, Casemiro (Maguire 92), Eriksen (Garnacho 72), Fernandes, Rashford (McTominay 92), Martial (Antony 45).
Subs: Heaton, Lindelöf, Elanga, Mainoo
CITY: Ederson, Walker, Akanji, Ake, Cancelo, Rodri, De Bruyne, Bernardo, Mahrez, Foden (Grealish 57), Haaland
Subs: Ortega, Phillips, Gündogan, Laporte, Alvarez, Gómez, Palmer, Lewis
Pep Guardiola reaction
“The game was really good. We played really good. They are an incredible threat in transitions, I congratulate the team.
“I’m proud to come here and play with this personality. They punished us in the transitions.
“(On United’s first goal) Rashford is offside, Bruno is not, Rashford distracts our goalkeeper and defenders, I don’t know the rule.
“The second half was really good. We missed a bit our threat up front, we were a little bit disconnected. Their full backs were close to the wingers.
“We made a fantastic game given the quality of the opponent.”
What it means
The result means City remain five points behind leaders Arsenal who play Tottenham tomorrow.
We have 39 points from 18 games as we approach the official halfway mark of the season.
What’s next
City’s busy January continues with another huge Premier League clash on Thursday, January 19 when we play host to Tottenham Hotspur at the Etihad.
Kick off at the Etihad is pencilled in for 8pm (UK time).
That’s then followed by another home league encounter, this time against Wolves, on Sunday, January 22, with kick-off slated for 2pm (UK).
News about Man United v Man City
Pitcam highlights: Manchester United 2-1 City
Watch the Manchester derby at Old Trafford from a unique angle. Watch more
Guardiola: Don’t waste energy on the past, focus on Spurs!
Pep Guardiola has urged his players not to ‘waste energy’ dwelling on the derby defeat to Manchester United – and instead focus on the upcoming encounter with Tottenham. Read more
Brief highlights: Manchester United 2-1 City
City suffered derby disappointment at Old Trafford as we slipped to a 2-1 defeat to United in the 189th Manchester derby. Watch more
Extended highlights: Manchester United 2-1 City
Watch extended highlights from the 189th Manchester derby. Watch more
Full-match replay: Manchester United v City
Tune in here to watch the full 90 minutes of City's Manchester derby with United. Watch more
Derby frustration will spark City says Goater
Shaun Goater says City’s controversial 2-1 defeat to Manchester United will light the blue touch paper for the second half of the season. Read more
Rodrigo 'so proud' to be a City player
Rodrigo says he has never been prouder to be a City player. Read more
Guardiola challenges City to get 'better and better' in the league
Pep Guardiola said he was satisfied with City’s effort and commitment despite seeing his side suffer a tough 2-1 derby defeat at Manchester United. Watch more