United came into the contest knowing victory would see them through to the last 16 with one group match left to play, but in Michael Carrick's first game as interim manager, United looked shorn of ideas in attack in the Estadio de la Ceramica.
The home side had much the better chances, with United goalkeeper David de Gea bailing his side out with several fines saves, the best of which denied Manu Trigueros a goal.
Out of nowhere, however, a poor pass from Villarreal keeper Geronimo Rulli that was miscontrolled by Etienne Capoue was then seized upon by Ronaldo, who lofted the ball over the stranded Rulli to give United the lead in the 78th minute.
The Portuguese forward got more than a helping hand for this important strike, but his finish was clinical. He also played a role in the second and clinching goal, laying the ball into substitute Bruno Fernandes, who squared for Sancho to put the result beyond doubt.
The performance may have been disappointing, but United got the job done, moving top of Group F with 10 points, three ahead of Villarreal, who can no longer catch Carrick's side due to their inferior head-to-head record.
"It's massive for our season," United captain Harry Maguire told BT Sport. "The last couple of months have been nowhere near good enough. We needed the result for our season and for our fans – we know how tough it’s been for them in recent weeks. We have to make sure this is just the start.”
A Ronaldo header, straight at the goalkeeper, was United's only shot on target in the half, with De Gea forced into two good saves to deny Trigueros and Yeremi Pino down the other end.
As United continued to sit back, Trigueros forced an even better save from De Gea at the start of the second half, with Villarreal sensing a beleaguered United might be there for the taking.
It took until the 72nd minute for United to put together a real attack of note with Sancho denied by a smart save, before the home goalkeeper's error changed the course of the match. Sancho picked an opportune moment to score his first of the season in all competitions, hammering the ball in off the underside of the crossbar to seal an important victory for the visitors in an otherwise disappointing season.