The Spaniard scored with a slightly deflected shot four minutes after coming on in the second half to give Louis van Gaal’s team a first victory in four attempts.
Van Gaal had again been forced to make changes to his team and it showed in a display that was often disjointed.
With Chris Smalling suspended after his red card at Manchester City and with Marcos Rojo having joined Rafael, Phil Jones and Jonny Evans on the sidelines, the hosts were again forced to field a makeshift back four.
Antonio Valencia, usually a winger, started at right-back, while the inexperienced Paddy McNair partnered Daley Blind, who normally plays in midfield, in central defence.
Michael Carrick had filled in at centre-back in last weekend’s derby, but he played in midfield against Palace on his first start of the season following an ankle injury.
Carrick saw plenty of the ball in the early stages against a Palace team who had clearly come with a plan to frustrate their hosts.
Left-back Luke Shaw was allowed to carry the ball to the edge of the box before unleashing a shot that Julian Speroni did well to save before Wayne Rooney curled high over the bar after probing work from Angel di Maria.
United’s start to the season, taking 10 points from their opening 13 matches, has been their worst since 1986, when Ron Atkinson was sacked and replaced by Alex Ferguson.
Van Gaal admitted to feeling “lousy” about that record on Friday and warned that it could take three years –- the duration of his contract — for him to restore United as a genuine force in England and in Europe.
– Campbell spurns chance –
Confidence at Old Trafford is far from its peak and Neil Warnock’s visitors almost took advantage of their hosts’ vulnerability five minutes before the break.
Lack of communication between McNair and Blind meant that Joel Ward’s long ball from the back was allowed to find its way to Fraizer Campbell inside the United area.
The former United striker lifted the ball over goalkeeper David de Gea, but to the home fans’ relief, the lob also cleared the crossbar.
United continued to press, but there was a lack of nous about much of their approach work.
Rooney curled a low effort narrowly wide from 20 yards after McNair had carried the ball out of defence, before Marouane Fellaini’s aerial strength almost handed the hosts the lead.
The Belgian rose well to meet Rooney’s right-wing corner, but James McArthur was well placed on the post to volley the ball to safety.
Van Gaal introduced Mata in place of Adnan Januzaj and the Spaniard took just four minutes to contribute with the opening goal, albeit with the help of some good fortune.
Di Maria’s short return pass found Mata 22 yards from goal and the 26-year-old shifted the ball onto his left foot before beating Speroni with the help of a minor deflection.
The relief was evident on the faces of Van Gaal and Ryan Giggs, the manager’s assistant, in the home dug-out and palpable among the 75,325 fans inside the stadium.
It was Mata’s third goal of the season and the former Chelsea playmaker came close to adding to his tally when his first-time shot struck the post after Speroni had foiled Robin van Persie.