Mario Pasalic put Atalanta ahead in the 15th minute, turning in Davide Zappacosta's low ball from close range and United, with just one win in their last five games in all competitions, looked drained of belief.
- Dawson: Have Manchester United turned a corner in UCL?
- ESPN+ guide: LaLiga, Bundesliga, MLS, FA Cup, more
- Don't have ESPN? Get instant access
A clever ball from Bruno Fernandes allowed Rashford to cut in from the left and he picked his spot with a shot into the far corner.
United drew level when Harry Maguire drilled the ball home at the back post after the stationary Atalanta defence failed to intercept a Fernandes ball across the box.
Then came the winner as Luke Shaw whipped in a superb cross from the left and Ronaldo rose superbly to perfectly place a header past Musso.
"I was right behind him. His leap, his timing, it was perfect right in the corner," Maguire said.
"We see it day in, day out in training and in the goals he has scored throughout his career. He has come up with a massive goal for us again in the Champions League," he added.
"We got the goals we needed and deserved and I think we deserved the win in the end. Yes, we made it difficult but it is a tremendous victory in the end."
United top the group after three games on six points with Atalanta and Villarreal two points behind.
The win also allievates some pressure on United manager Ole Gunnar Solskjaer, who had come under criticism for the team's recent poor form.
"The fans are a big part of this club. The singing section there kept the players going with their belief. That is what you do at Manchester United on a Champions League night. This corner of the stadium here are the best in the world. There is a bit of time when you are down as a supporter but you keep going," Solskjaer said.
"I thought we played well first half too. Two chances, two goals. It had to stop if we are to survive. We have a habit of doing this at this club. I thought we played well and they scored a goal out of nothing and then another set-piece. But they never stopped believing and kept going."
On the jeers directed him and the players during the first half, Solskjaer said: "Don't disrespect the players. They play for Manchester United and they know they are the luckiest men in the world. Tonight they are the luckiest men in the world because they get to play for Manchester United. That is what so many millions of boys and girls want to do."