A Juan Mata free kick on 86 minutes followed by an Alex Sandro own goal as injury time approached gave Jose Mourinho’s side a win that looked unlikely for most of the match.
Juventus had hit the woodwork twice before Ronaldo opened the scoring with a spectacular volley in the 64th minute.
And although Juve came close to extending their lead through Miralem Pjanic and Juan Cuadrado, they somehow contrived to throw away the lead in the closing stages.
That was of little concern to Manchester United who move back into second place in Group H above Valencia who defeated Young Boys 3-1 earlier Wednesday.
United boss Mourinho stormed onto the pitch and cupped his ears on the full time whistle to the chagrin of the of the home crowd who jeered loudly.
Afterwards the Portuguese, who had to be escorted off the pitch, said he should not have reacted.
“I didn’t offend anyone at the end, I just made a gesture that I wanted to hear them louder,” he told reporters.
“I probably shouldn’t have done it, and with a cool head I wouldn’t have done it, but with my family insulted, including my Inter family, I reacted like this.”
Mata told UK broadcaster BT Sport that it was a “very good night for us.”
“To get the three points against Juventus in Italy is amazing,” he added.
Juve’s fortress breached
Juventus came into the game on the back of a remarkable run of games that had seen them play 14, win 13 and draw one this season.
They also hadn’t lost a Champions League game at home since 2009 when they were beaten by Bayern Munich.
It looked like another victory was on the cards after Ronaldo opened the scoring.
The Portuguese striker, the Champions League record goalscorer, smashed a spectacular volley past United keeper David de Gea after running onto Leonardo Bonucci’s lofted pass.
Ronaldo played for United between 2003 and 2009 winning three Premier League titles as well as the 2008-09 Champions League.
Juventus had had the better of the exchanges before opening the scoring and could have added to their advantage before United equalized.
Cuadrado fired over after linking up with Ronaldo while a long-range Pjanic shot dipped just over.
The Italian side would come to rue that profligacy, though, when United were awarded a free-kick on the edge of the Juve penalty area.
Mata stepped up and clipped the ball over the defensive wall and past the despairing Wojciech Szczesny.
Within three minutes, United were ahead. Another free-kick, this time from close to the touch line was swung in by Ashley Young and allowed to bounce before glancing off Szczesny, Bonucci and then Sandro as it dropped into the Juve net.
Second best for the majority of the match, United players could hardly believe their luck at securing such a dramatic win.
Juventus would have qualified for the last-16 had they held on for the draw.
As things stand, a victory at home over Valencia in their next Champions League match will still ensure their progress.
Manchester United face Young Boys next and know that a victory coupled with a Juve win or draw against Valencia ensure they also escape the group stages.