Rooney watched Nani's floated 77th-minute cross then leapt to send the ball flying past Joe Hart, the City goalkeeper rooted to the spot, to send United eight points clear of their local rivals.
It was tough luck on City, who were the better side, and responded to Nani's opener by levelling through an Edin Dzeko shot which deflected in off David Silva.
But Rooney's moment of genius was worthy of winning any game and with City surely out of the running now, maybe it will win United the Premier League title too.
Nani beat Hart with clinical ease in the 41st minute and although Dzeko's shot deflected off Silva for a 65th-minute equaliser, the inspirational figure was wearing red, Rooney meeting Nani's cross with a jaw-dropping overhead kick that sent the ball into the far corner in the 78th minute.
Source: PA
Source: PA