The 28-year-old rifled in a low finish past City keeper Willy Caballero early in the second half at Old Trafford on a night of few chances but plenty of derby fervour as United boss Mourinho won the tactical battle against Guardiola's much-changed City side.
The result lifted some of the pressure off Mourinho following Sunday's 4-0 defeat to Chelsea, but for his old sparring partner, Guardiola, it was a sixth successive game without victory, his longest winless streak as a manager.
Neuer urges Mourinho to end Schweinsteiger's Utd exile
Recent results and the gathering pressure on both Mourinho and Guardiola ensured the clash at Old Trafford had all the usual spice of a derby encounter even if City made nine changes to their side against a virtually full-strength United team.
City should have gone ahead after two minutes, but Kelechi Iheanacho darted in front of his marker to direct his header hopelessly off target from close range.
United offered little attacking threat, but gained control of possession as the match wore on and were the more dangerous side for most of the encounter.
Man United's Bailly expects two-month lay-off
It took until the start of the second half, however, for them to create a meaningful chance when Paul Pogba's low shot was turned onto the post by Caballero, sparking an onslaught from the home side that ended with Mata's opener on 54 minutes.
Zlatan Ibrahimovic shrugged off a challenge then played the ball back towards Ander Herrera, who went down dramatically in the box, but Mata was following up to powerfully steer the ball home.
Then it was just a case of holding on, which they did comfortably, as Mourinho recorded his fourth victory over Guardiola in a rivalry spanning 18 matches.
The greater satisfaction for the Portuguese, however, seemed to be erasing some of the negativity of Sunday's thrashing by his former club Chelsea.
"The fans felt deeply after such a negative result [on Sunday] and today was a good chance to clear that feeling because a derby knockout and to win gives everyone a better feeling," said Mourinho.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ