Cavani netted twice in the first half and scored his and Napoli's third early in the second half as Walter Mazzarri's side leapt above Lazio and inflicted the second defeat of 2011 on Juve, who were actually unfortunate to lose at the Stadio San Paolo.
Napoli goalkeeper Morgan De Sanctis denied Amauri twice and the Bianconeri had a valid goal ruled out in the first half.
If ever a game demonstrated how thin the line is between success and failure, this was it.
Juventus had the majority of the chances and De Sanctis was by far the busier of the two goalkeepers, yet Cavani needed just three sights of goal to win the points.
His first goal came with his first touch of the game, and that after 20 minutes.
A cross from Christian Maggio from the right teed up the Uruguayan perfectly and Leonardo Bonucci's attempted clearance on the goal line was in vain as Cavani's powerful header sent the crowd into raptures.
Amauri almost levelled immediately with De Sanctis making an excellent one-handed save to deny him.
From the resulting corner, Juve thought they had levelled when Luca Toni headed the ball in, but the referee rather harshly halted play for a foul on De Sanctis by Juve's new signing.
On chances, Juve could have been 2-1 up, yet they slipped 2-0 behind when Cavani made only his second touch of the game count in the 26th minute.
This time, Andrea Dossena was the provider with a cross from the left and another header from Cavani left Marco Storari with no chance.
Amauri was denied again by De Sanctis early in the second half as the Bianconeri continued to pose the greater threat.
But Cavani only needed an inch as he completed a hat-trick of headed goals in the 53rd minute, diving low at the far post to nod in Marek Hamsik's cross.
He could have had four had Ezequiel Lavezzi made better use of the ball in a two-on-one situation, but his pass sent Cavani a bit wide of goal and his shot was weak and easy for Storari to save.