Michael Carrick stood in as caretaker manager ahead of the game at the Estadio de la Ceramica, and he watched on as United struggled to create chances for much of the contest
But his side burst into life towards the end of the second half, the two goals ensuring United reaches the Champions League last 16 with a game to spare.
Ronaldo opened the scoring with 12 minutes of the match remaining as he capitalized on a poor pass from Villarreal goalkeeper Gerónimo Rulli to Etienne Capoue — who was put under pressure by Fred — to chip the ball over Rulli.
Sancho then grabbed his first United goal and wrapped up the win in the game’s final moments as he finished off a counter-attacking move involving Marcus Rashford and Bruno Fernandes.
The victory will be a huge boost for United and Carrick following the team’s 4-1 defeat against Watford on Saturday.
“When you’ve suffered results-wise and you’re not in a great vein of form individually and as a team then it’s not easy to come out and just let everything click,” Carrick told BT Sport after the game.
“In some ways, it was the best way to win for me, that we had to show some character, we had to dig in, we had to fight.”
Villarreal, which defeated United to win the Europa League last season, dominated possession in the first half and had chances to take an early lead through Moi Gómez and Yeremi Pino.
United goalkeeper David de Gea was then twice called into action by Manu Trigueros — once in the first half and again midway through the second half — and twice produced good saves to deny the midfielder.
That kept United in the game and able to find the breakthrough via Ronaldo, who scored the winning goal when these two sides met in September.
More chances came for the visiting side for Ronaldo and Rashford, but it was Sancho who got the second with a thumping shot into the top of the net.
Villarreal faces Atalanta next week in its bid to qualify for the Champions League knockout stages.