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 to the chagrin of the of the home crowd who jeered loudly.
Jose Mourinho gestures to the crowd after Manchester United beat Juventus.
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.