Mata netted in the 87th minute to fire the Blues into third before Rafael saw red for the Premier League champion.
The Spaniard was Chelsea’s best player throughout a dire game at Old Trafford and finished a sweeping counterattack in the 87th minute as he drilled low into the bottom corner.
United full back Rafael was then sent off one minute from time for kicking out at Chelsea defender David Luiz in an extraordinary end to a game that lacked any spark and looked unlikely to produce a goal.
The result sees the Blues move up to third in the Premier League table ahead of Wednesday’s crunch clash with London rival Tottenham, while they are now one point ahead of fourth-placed Arsenal.
The importance of the victory was evident in the triumphant celebrations in front of the away end at full time and Chelsea is now well placed to secure a top four finish this season.
Sir Alex Ferguson made five changes to the side that drew with Arsenal, with David De Gea, Michael Carrick and Wayne Rooney among the players who dropped to the bench. Chelsea made four changes to the side that reached the Europa League final on Thursday as Ashley Cole, Juan Mata, Oscar and Demba Ba returned to the starting lineup.
Ferguson and his Chelsea counterpart Rafa Benitez have never seen eye-to-eye and did little to play down their feud ahead of the fixture with thinly veiled barbs directed at each other in their pre-match press conferences.
But the two men shook hands before kickoff, a gesture that seemed to be interpreted by the players as a signal to drop arms during a lackluster first half that felt more like a testimonial than an end-of-season clash between two of the biggest clubs in the country.
United lacked any vibrancy in its attacking play while Chelsea was happy to keep men behind the ball, sit deep and play on the counterattack.
It was a tactic that nearly paid off in the 14th minute when Oscar broke down the right side, cut in to the United penalty area and toe-poked a right-footed shot that Anders Lindegaard managed to tip on to the near post before gratefully collecting the rebound.
At the other end, Robin van Persie could only head straight at Chelsea goalkeeper Petr Cech and the Premier League’s top scorer then shot just wide as he latched on to a pass from Ryan Giggs three minutes before the break.
There was no improvement after the re-start as the teams continued to cancel each other out.
Then, out of nowhere, Chelsea found the winner. Ramires broke down the middle and fed Oscar, who played a first-time pass for Mata and the Spaniard fired a sweet low drive across goal into the bottom corner via the post.
The goal completely changed the atmosphere at Old Trafford and moments later Rafael was sent off after hacking down David Luiz by the corner flag.