It appeared Napoli would have to settle for a draw at the Stadio Ennio Tardini after Paolo Cannavaro's 75th-minute own goal cancelled out Marek Hamsik's first-half opener.
However, Cavani had other ideas and the in-form Uruguayan raced clear five minutes from the end to slot home the winning goal and inflict a first home league defeat on Parma since last March.
Juve's recent blip in form continued last night as they were surprisingly held at home by relegation-threatened Genoa, and Napoli looked determined to turn the heat up on the leaders with a victory today.
The Azzurri had already tried their luck through Goran Pandev before Hamsik opened the scoring in the 29th minute, the Slovakia forward beating Aleandro Rosi before drilling a low shot past Parma keeper Antonio Mirante.
Napoli went in search of a second goal before the break but Cavani's free-kick was easily saved by Mirante, who then had to work a lot harder to deny Blerim Dzemaili with a brilliant save when one-on-one.
Parma produced little to worry Napoli before the interval but they almost drew level in the 53rd minute when Alessandro Lucarelli drilled in a shot from outside the box which Morgan De Sanctis needed to tip over the bar.
The hosts were celebrating an equaliser 15 minutes from time, though, when former Parma defender Cannavaro, starting a game for the first time since his six-month ban was overturned on appeal, inadvertently deflected Nicola Sansone's left-wing cross into his own net at the near post.
That looked like proving costly for Napoli, but with time running out they snatched a winner thanks yet again to that man Cavani.
The South American beat the offside trap and coolly finished past Mirante to take his tally to 27 goals in all competitions this season.