Erik ten Hag's side desperately needed a victory at Villa Park to close the gap in the race to qualify for next season's Champions League.
United remain in sixth place after their fourth successive victory in all competitions, but they are now just five points behind fifth-placed Villa and six adrift of fourth-placed Tottenham.
"It is a massive win for us. We've got closer and that was the aim for today. The way we did it, I liked it," Ten Hag said.
"At 1-1 we had to fight back and we are really happy about that. It was so open, like a tennis match. It could go two ways, but we found the mentality and character to win.
"Scott is great. He is an example for many players these days. He is always ready to come on and make a difference."
Villa boss Unai Emery added: "We were playing well against the mighty Manchester United, but we couldn't score some clear chances.
"The result is tough for us and difficult to accept but that's football. We played like we planned and deserved more."
While a top four place is still a tough ask for United, they have at least given themselves a chance with their gritty success in the West Midlands.
Significantly, they are finally flourishing in attack after misfiring for much of the campaign.
Hojlund's winner against Villa on Boxing Day has kick-started a run of six goals in seven games for the Denmark striker.
After failing to score in any of his first 14 games in the Premier League, the 21-year-old has become the second youngest player to net in five successive appearances in the competition, behind Nicolas Anelka for Arsenal in 1998.
Hojlund now has 11 goals in 29 matches in all competitions in his debut season after signing from Atalanta, with his latest arriving in the 17th minute.
Ollie Watkins wasted a golden opportunity to equalise when he raced onto McGinn's pass, only to shoot straight at Onana.
Onana kept United ahead with an instinctive save to repel Watkins' close-range shot from Matty Cash's low cross.
Fernandes should have done better than smash wildly over from Alejandro Garnacho's cutback.
It proved a crucial miss as Villa deservedly equalised in the 67th minute.
The Villa forward picked out a perfect pass to Luiz and the Brazilian fired home from five yards before celebrating in flamboyant fashion in front of Onana.
Garnacho almost restored United's lead with a superb run and strike, but Martinez saved at full-stretch.
Onana got a measure of revenge for Luiz's provocative celebration when he saved the midfielder's scuffed effort.
And United snatched three priceless points in the 86th minute as McTominay rose highest to meet Diogo Dalot's cross with a thunderous header that flashed past Martinez.