The repeat of last season’s Europa League final, which the Spanish side won on penalties, looked to be heading for a draw after another disappointing United performance but summer signing Ronaldo stroked home from Jesse Lingard’s lay-off to spark jubilant scenes at Old Trafford.
However, visiting manager Unai Emery will be left wondering how his side did not come away with all three points.
United started brightly, with Bruno Fernandes scooping over and Ronaldo also failing to hit the target with a header in the opening seven minutes.
Villarreal took charge thereafter but could not score in a first half in which they created chance after chance.
United goalkeeper David de Gea made vital reflex saves to deny Arnaut Danjuma and Paco Alcacer, and also thwarted Yeremi Pino.
Striker Alcacer should have scored when Raphael Varane misjudged the bounce of the ball but dragged his shot wide, and Alberto Moreno and Pino both blazed over from promising positions.
But they did break the deadlock at the start of the second half as Danjuma got in behind and pulled the ball back for Alcacer to convert from close range.
United were finding it difficult to make inroads but equalised through Alex Telles’ moment of genius, as he smashed a first-time volley from 20 yards into the bottom corner.
Ronaldo’s winner means Ole Gunnar Solskjaer’s side pick up their first win while, in the group’s other tie, Atalanta beat Young Boys 1-0 to go top of the table.