An injury-hit Atalanta were leading 2-0 at halftime thanks to goals from Mario Pasalic and Merih Demiral but could not keep the hosts at bay.
The Red Devils were fired up after the break and quickly mounted a lot of pressure on the Italians. Marcus Rashford halved the deficit on 53 minutes before defender Harry Maguire levelled the playground on the 75th minute mark.
The game was heading for a stalemate before Cristiano Ronaldo rose highest to head Manchester United in front and that was enough to beat La Dea.
“I don’t know if we couldn’t have done more. Of course, we believed, but in an environment like this it just takes a spark to get them fired up again,” Gasperini told Sky Sport Italia after the game.
“We had the sensation we were holding out, we went very close to going 3-1 up and their goalkeeper made a wonderful double save, then the 2-2 happened.
“Inevitably, we might’ve held out longer with a few more players available, but we conceded three goals on fairly messy situations.”
Atalanta will now switch their attention to the Serie A when they entertain Sampdoria at the Gewiss Stadium on Sunday.