The Spain international helped himself to two goals, with Claudio Marchisio and Stephan Lichsteiner the other goalscorers for the Bianconeri
Mauricio Pinilla put Cagliari in front midway through the first half with a powerful finish before Llorente's precise header levelled matters before the break.
But three goals in seven second-half minutes sunk Cagliari.
Claudio Marchisio scored Juve's second in front of Manchester United manager David Moyes, in attendance as he reportedly mulls over a move for the Italy international, while Llorente and Stephan Lichtsteiner tapped in from close range to guarantee the points and ended Cagliari's seven-match unbeaten run, who saw Pinilla sent off late on.
Both sides each made one enforced change from last week. Antonio Conte replaced the suspended Andrea Barzagli with Martin Caceres, while Cagliari drafted in Daniele Dessena in place of Radja Nainggolan, who departed for Roma on Wednesday.
Juve went into the game in phenomenal form on a run of 10 straight wins and created the first chance early on when Lichtsteiner swung a cross onto the head of Llorente, but the effort was straight down the throat of Antonio Adan.
But it was Cagliari who drew first blood after 20 minutes. Andrea Cossu's cross was flicked on and found Pinilla in space 12 yards out, and he lashed past the helpless Gianluigi Buffon.
The home side went into the game with the champions unbeaten in seven and Pinilla unleashed a 25-yard drive that forced Buffon into a sprawling save.
But Juventus had dropped just four points away from home all season and drew level after 31 minutes when Llorente met Lichtsteiner's superb cross, 12 yards out, and powered a header into the top corner.
They were indebted to Buffon moments later when he made a miraculous save to keep the scores level. Nicola Murru's left wing cross found Dessena six yards out but his low header was somehow repelled by the Italian goalkeeper, with Lichtsteiner wasting a golden chance to put Juve ahead just before the break.
Conte's men started to take control, with Carlos Tevez forcing Adan into a fine low save, but their pressure finally told after 72 minutes when Marchisio rifled home a 30-yard stunner.
The win was secured three minutes later when Lichtsteiner's low cross was tapped in from close range by Llorente for his seventh league goal this season.
And the Switzerland international got on the scoresheet himself, 10 minutes from time, when Adan fumbled a weak Llorente shot and he bundled in the rebound.
Cagliari's misery was compounded late on when Pinilla was shown a red card for dissent.