Roma needed a last-gasp equaliser to claim a 1-1 draw at Atalanta earlier in the day and Juve's late goal of their own saw them move three points clear at the top of Serie A.
Juve – who are gunning for a third straight league title – dominated the first half but a lack of cutting edge hurt them.
Goalkeeper Gianluigi Buffon made a string of superb saves in the second half, frustrating Udinese as he kept his sixth league clean sheet in a row.
Antonio Conte's men then piled on the pressure in the latter stages, with Llorente heading in Stephan Lichtsteiner's shot in the 90th minute to spark wild celebrations, as Juve made it seven wins from as many Serie A home matches this season.
Juventus made three changes from the side that beat Copenhagen 3-1 in the UEFA Champions League on Wednesday, with Claudio Marchisio, Andrea Barzagli and Paolo de Ceglie all coming in as Paul Pogba surprisingly dropped to the bench.
Allan replaced Giampiero Pinzi for Udinese, who were on the back foot early in Turin as the hosts started brightly.
Carlos Tevez was denied twice by defender Danilo early on and also forced an outstanding save from Udinese goalkeeper Zeljko Brkic in a dominant start.
The hosts were dealt a major blow 14 minutes in as Andrea Pirlo was forced off with an apparent knee injury, sustained in a clash with Andrea Lazzari, Pogba replacing him.
Tevez saw a first-time effort with his left foot go just wide four minutes later, before Udinese captain Antonio Di Natale missed a good chance at the other end when Buffon saved his chip with Roberto Pereyra well-placed centrally.
The Argentinian again shot wide as the first half petered out, with Juve unable to convert their dominance into clear-cut chances.
Llorente got in the way of Tevez just after the break, and they were nearly made to pay, only for Buffon to pull off an outstanding double save in the 53rd minute.
The keeper first saved Bruno's effort from the right and then quickly reacted to deny Di Natale from the rebound, and nine minutes later he moved superbly to tip Lazzari's swerving 20-yard strike over the bar.
Tevez shot straight at Brkic at the other end before he fired just over from a free-kick with six minutes to play.
Fabio Quagliarella came off the bench and forced a good save from Brkic shortly after, and Llorente had a late header cleared off the line, but he still managed to have the final say in Turin, reacting sharply to turn Lichtsteiner's wayward shot home.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.