The Spanish midfielder chipped over keeper John Ruddy to settle the third-round replay after being put through on goal by Anthony Martial.
Wolves had an early Pedro Neto strike ruled out by the video assistant referee for a handball in the build-up.
But it was a deserved win for the hosts, who had the better chances in a tight game at Old Trafford.
Manchester United will next travel to either Watford or Tranmere – whose third-round replay at Prenton Park on Tuesday was postponed because of heavy rain.
Ole Gunnar Solskjaer’s side did not manage a shot on target in the goalless first game between the two sides at Molineux on 4 January but were much more threatening in the return match.
After a high-tempo start, the game settled down – but Mata, 31, produced the one moment of quality to seal victory, rolling back the years with a clever finish.