The Dutchman swung in a 25-yard free-kick which took a crucial nick off Samir Nasri's stretched leg and entered the far corner. City thought they had clinched a 2-2 draw after Pablo Zabaleta's equaliser in the 86th minute.
United went two-goals ahead in the first half through Wayne Rooney's double. The England international became the highest scorer for United in the Manchester derby.
City's Yaya Toure got one back for the hosts at the hour mark just after Ashley Young was denied a third goal which was incorrectly given offside.
Roberto Mancini took a huge gamble playing Mario Balotelli upfront ahead of Carlos Tevez. The match turned nasty as fans invaded the pitch while United defender Rio Ferdinand was left bleeding after the crowd pelted coins towards the end.