Despite a dominant first-half display, Juve - who were defeated by Lazio in the Supercoppa Italiana in their final match of 2019 - were unable to find a way through before Klavan's calamity.
But once presented with a clear chance, Ronaldo made no mistake, keeping his composure to beat Robin Olsen, who was beaten again by the former Real Madrid star from the spot in the 67th minute.
Ronaldo's penalty came after Giovanni Simeone almost snatched an equaliser against the run of play, but a strike from substitute Gonzalo Higuain and a composed third from Ronaldo comfortably ensured Juve made it 30 consecutive home league matches without defeat.
5 - For the first time Cristiano Ronaldo has scored in five games in a row with Juventus in Serie A. Continuous. #JuveCagliari
— OptaPaolo (@OptaPaolo) January 6, 2020
Having kept out an Aaron Ramsey volley, Olsen pulled off a fantastic stop from Ronaldo's 30th-minute header, although any goal from that attack would have been subject to a VAR check for offside.
Olsen was beaten with 10 minutes of the first half remaining, only for Merih Demiral's header to clatter the crossbar.
Yet Cagliari's luck ran out four minutes after the restart - Ronaldo latching onto Klavan's dreadful pass before coolly rounding Olsen and drilling home.
Klavan's day nearly turned from bad to worse a few moments later, as Olsen's save from Paulo Dybala's strike deflected towards goal off the hapless defender, but Cagliari's goalkeeper sparred him further embarrassment.
Simeone's header against the crossbar offered Juve a warning, though Cagliari's hopes of a comeback were extinguished when Ronaldo slotted in from the spot after Marko Rog upended Dybala.
Juve were not finished, though, and less than a minute after Higuain's low effort spun in off Klavan, Ronaldo was on hand to slide in his third and complete the rout.
Cagliari's was Joao Pedro denied a stoppage-time consolation by the left upright.
— JuventusFC (@juventusfcen) January 6, 2020
What does it mean? Juve pick up where they left off
Given Inter play later on Monday against Napoli, Maurizio Sarri will have been eager for his side to make their mark and kick-off 2020 with a win - a third consecutive triumph in the league.
They did so in imposing fashion, with Simeone's chance the only time Juve looked remotely threatened by a Cagliari side that has now suffered three straight defeats.
New year, same Ronaldo
Juve's talisman turns 35 in early February but is showing no signs of slowing down. After capitalising on Klavan's mistake to score for a fifth successive league game – the first time he has done so since moving to Serie A – Ronaldo had the bit between his teeth, and duly ran Cagliari ragged.
Klavan's unwise decision provides Juve with a timely gift
On a public holiday to celebrate the Epiphany, Klavan picked his moment to present Juve with a gift and did not looking like a particularly wise man in the process. Cagliari never recovering from his mistake.
Juve face a tough test with a trip to Roma on Sunday, while Cagliari host Milan - and Zlatan Ibrahimovic - a day earlier.
Photo: Twitter (@juventusfcen) Caption: Cristiano Ronaldo scored a hat-trick against Cagliari