An Oscar shot for Chelsea was palmed on to the post by home keeper Anders Lindegaard before United's Robin van Persie glanced a shot just wide.
The match appeared to be petering out when Mata's shot went in via a deflection off Phil Jones.
United had Rafael red-carded late on for a kick on David Luiz.
Liverpool and Everton also cancelled each other out in a forgettable 0-0 draw in the 220th Merseyside derby.
The point may have strengthened the Toffees' chances of finishing above their near-neighbours for the second successive season —something which has not happened since 1937 — but they rarely came close to ending a 14-year winless run at Anfield.
Italy: Juventus retained their Serie A title with a 1-0 home win over Palermo yesterday.
Juve only needed a point to claim their second straight Scudetto, and their 29th in total, but they took all three thanks to Arturo Vidal's 59th-minute penalty.
The victory lifts Juve 14 points clear of nearest challengers Napoli, who play Inter Milan tonight but can no longer catch the pacesetters with only three rounds of matches left after this weekend.
While Juve were left to celebrate the championship though, Palermo's problems at the other end of the table increased with yesterday's results.
They had picked up 11 points from their previous five matches heading to Juventus Stadium but their defeat, combined with Genoa's win at Torino, saw them fall three points adrift of safety.
Mario Balotelli revelled in the spotlight once again as his late goal helped AC Milan beat Torino 1-0 and put one foot in the Champions League.
The often-controversial Italy international has been a goalscoring revelation since swapping Manchester City for Milan in January, helping to ease the burden on Stephen El Shaarawy.
Yesterday's goal, which came with just six minutes left, was his 11th since arriving at the club, although typically it was followed by a booking for dissent.
Milan are now four points clear of fourth-placed Fiorentina in third — the final Champions League spot — and with three games left, they will have to go some to let it slip.
Spain: Cristiano Ronaldo made it 199 goals for Real Madrid in less than four seasons as two towering headers helped earn an entertaining 4-3 win over Valladolid.
The hosts bounced back from their Champions League elimination at the hands of Borussia Dortmund to keep the Primera Division title race alive for one more weekend at least.
The build-up to the match was dominated by the future of coach Jose Mourinho and his expected departure to Chelsea, but, should he leave, Ronaldo is one player he would certainly miss.
Atletico Madrid ensured they will be playing Champions League football next season after playing out an uninspiring goalless draw with Deportivo La Coruna at the Riazor.