The result ensured Alex Ferguson’s side reduced the gap on Roberto Di Matteo’s Premier League leaders to just one point, but the Blues were left fuming at the performance of referee Mark Clattenburg.
Chelsea had recovered from falling behind to a David Luiz own goal and a Robin van Persie strike to level through goals from Juan Mata and Ramires when Branislav Ivanovic was sent off for a 63rd-minute foul on Ashley Young.
More contentious, though, was the second yellow card shown to Fernando Torres five minutes later, after the referee had decided the striker dived following a challenge by Jonny Evans.
Replays suggested there had been contact between the two players and the decision sparked fury on the Chelsea bench that led to a touchline altercation between Ferguson and Di Matteo’s staff.
Worse was to come for the home side, with substitute Hernandez clinching victory in the 75th minute with a close-range finish from what appeared to be an offside position.
The events of the final half hour ensured the match ended in controversy but before that it had already been a thrilling encounter.
The pre-match handshake between Rio Ferdinand and Ashley Cole, together with the absence of John Terry — who is serving a four-match ban for racially abusing Ferdinand’s brother, Anton — removed a potential flashpoint.
But the subsequent 90 minutes more than made up for it.
It was United who started the game with the greater urgency and were clearly driven by the motivation to keep Di Matteo’s side within their sights at the head of the table.
While United quickly got into their stride, attacking fluently down their right-hand flank, Chelsea’s defence looked disjointed and nervous, and the absence of Terry was telling.
Petr Cech was called into action after less than three minutes when van Persie drilled in a stinging left-foot shot from outside the area.
But the home goalkeeper had no chance of preventing United taking the lead 60 seconds later after Wayne Rooney had worked his way to the byline and pulled back for van Persie, whose shot crashed off the post and into the net via the back of Luiz.
The second came just eight minutes later after another lightning move down the United right.
Goalkeeper David De Gea started the move by rolling the ball out to Ferdinand and it ended with van Persie sweeping the ball home from Antonio Valencia’s low cross.
Chelsea looked in desperate trouble, while United were rampant.
Slowly, though, the home side worked their way back into the game and when they were finally able to play to their strengths in the attacking third, the momentum of the game shifted dramatically.
Suddenly it was De Gea who was the busier of the two keepers and the young Spaniard kept his side in it before Mata eventually halved the deficit shortly before the interval.
Rooney fouled Eden Hazard on the edge of the United area, allowing Mata to curl a precise free-kick around the wall and beyond the reach of De Gea.
Di Matteo’s side continued where they had left off after the break and were level eight minutes into the second period when Ramires headed home from Oscar’s cross.
At that point the game was perfectly poised, before an incident-packed five-minute spell left Chelsea with nine men and United poised for victory.
Ivanovic was first to see red in the 63rd minute when he tripped Young as the United winger was bearing down on goal after being played in by van Persie.
And when Torres followed five minutes later, it was always going to be an enormous task for Chelsea to hold on.
But their sense of injustice was further fuelled by Hernandez’s strike after the Mexico forward turned home Rafael’s drilled cross.