Manchester United moved into the Champions League last 16 thanks to two late goals against Villarreal in Michael Carrick’s first game as caretaker manager.
Cristiano Ronaldo maintained his record of scoring in every game in this season’s competition when he lifted the ball over goalkeeper Geronimo Rulli in the 78th minute, after Fred had dispossessed Etienne Capoue.
Jadon Sancho then sealed the victory in injury-time when he blasted a shot that went in off the underside of the crossbar.
United, who sacked Ole Gunnar Solskjaer on Sunday, are top of Group F with one round of matches left.
However, they were indebted to goalkeeper David de Gea, who produced two superb one-handed saves, one in each half, to keep out well-struck efforts from Manu Trigueros when it was goalless.
United will be guaranteed to progress as group winners with a game to spare if Atalanta fail to win away at Swiss side Young Boys in the later game on Tuesday.