"We made life complicated for ourselves yet again, but the team showed great desire to bring the result home," Juventus coach Andrea Pirlo told Sky Italia.
"There is fatigue, mental fatigue. When you are used to winning the league, not fighting for the Champions League, something changes in everyone's minds.
"But our goal has been changed for a few weeks, we must qualify for the Champions League at all costs."
The visiting defence was caught napping when Udinese wing back Nahuel Molina latched onto a quickly taken freekick to fire home the opener after 10 minutes.
But Rodrigo De Paul stuck out an arm to block a Ronaldo free kick with seven minutes remaining and the Portuguese converted the resulting penalty to end his run of three games without a goal.
Ronaldo then headed in an 89th-minute winner from close range to take his tally to the season to a league-high 27 Serie A goals in 30 appearances.
But the striker's goals papered over the cracks of another poor performance from Pirlo's team.
"If we are satisfied with these 10 minutes, it means that we have not understood anything," Juve defender Leonardo Bonucci told Sky Italia.
"We can't change gear and keep it up for the whole game, that is the hardest thing to understand.
"Matches are decided by episodes, after this many games you need to pay attention to the details. We have dropped points too many times because of the details."