The reigning Italian champions led in the 12th minute through an Alberto Aquilani header but Cavani stole the show with a treble in less than 40 minutes.
Speaking after the match, the Uruguyan striker was delighted and expressed his hopes of winning the Scudetto.
"As a child, I was always told to dream," he told La Domenica Sportiva.
"I would love to win the Scudetto, but we know it will be very hard. I dedicate this victory to the fans, they deserved this result.
"We know what our flaws and limitations are. We know we must work like we have been doing."
Napoli's next Serie A match sees them travel to Verona to face Chievo on Wednesday.