Juve fell behind in the 10th minute when Udinese wing-back Nahuel Molina latched on to a quickly taken free-kick to fire home for the hosts.
But Rodrigo De Paul stuck out an arm to block a Ronaldo free-kick with seven minutes remaining and the Portuguese ace converted the resulting penalty.
Ronaldo then headed in an 89th-minute winner from close range to take his tally for the season to a league-high 27 goals in 30 appearances.
The victory saw Juve climb into third spot on 69 points, level with Atalanta in second and AC Milan in fourth, but two points ahead of fifth-placed Napoli.
However, Ronaldo's late brace didn't disguise another poor performance from Andrea Pirlo's side.
Get instant notifications as they happen.
You can change your preference anytime from browser settings.
Note: if your browser block the pop-up then you need to allow it.