Kompany headed home from a corner on the stroke of halftime to settle a highly-charged title duel at Eastlands which ended with City going top of the table by virtue of their superior goal difference.
The victory means that wins over Newcastle and Queens Park Rangers in their remaining games will almost certainly mean City claim their first league crown in 44 years while United would finish the season without a trophy.
Kompany’s winner settled an at times ill-tempered duel which was beamed to a worldwide audience estimated in the hundreds of millions but mostly failed to live up to its pre-match hype.
The pressure-cooker nature of the occasion was reflected by an ugly touchline bust-up involving United manager Sir Alex Ferguson and his City counterpart Roberto Mancini on 76 minutes.
A visibly enraged Ferguson had to be restrained from confronting Mancini after the Italian had marched into the technical area to complain after Nigel De Jong was booked for a cynical challenge on Danny Welbeck.
City captain Kompany celebrated a famous win after a goal that sealed a home-and-away double over United.
“Absolutely buzzing. We’ve been waiting for this moment,” Kompany told Sky Sports television.
“It’s far from over and we know that, but to give our fans two wins over United this season… we have to finish it off and we have to do it over the next two games.
“For us to get this result, we wanted it so bad. It all comes down to the dream we had when we were children, and we all want it so much.”
City dominated possession and territory in a scrappy first half, but struggled to create clear chances against a United side who had flooded midfield with five men, leaving Wayne Rooney as the lone striker.
The home side were also given a huge scare after only two minutes, when Michael Carrick’s shot from inside the area was blocked to safety by Kompany.
That early scare aside it was largely all City, although United’s defence were rarely troubled as the home side struggled to find their passing rhythm.
Samir Nasri brought the Eastlands crowd to their feet with a jinking run on 16 minutes which took him beyond the United defence before the France international played in Carlos Tevez, whose cutback was cleared by Phil Jones.
The fractious mood of the evening was reflected at Ferguson’s angry reaction after Kompany was booked for a clumsy challenge that poleaxed Rooney.
The moments before halftime marked City’s best spell of the match, with David De Gea needing to be alert to intercept a menacing cross from Gael Clichy.
Yet just when it looked as if United had survived the late onslaught, City went ahead.
David Silva curled in a corner from the right and Kompany leapt above Chris Smalling to power an unstoppable header past De Gea.
City again controlled possession in the second half, and they went close to scoring with late chances from Gael Clichy, Nasri and Sergio Aguero.
United meanwhile struggled to create any chances of note, their attempts to get back in the game foundering on a superb defensive effort from City.