In the build-up to Thursday's Europa League game Partenopei boss Walter Mazzarri had made a point of denying he was in charge of a one-man team, but his star man did his best to contradict him with a sterling performance.
Cavani opened the scoring after just seven minutes, and when his side slipped behind following strikes from Artem Fedetskiy and Roman Zozulya, he hauled them back with goals after 77, 88 and 93 minutes.
Napoli's opener came after Gokhan Inler combined with Blerim Dzemaili, whose finesse pass found its way to Cavani who calmly applied the finish.
Cavani forced a corner four minutes later, with team-mate Andrea Dossena heading narrowly over the bar from the subsequent delivery.
Dossena shot high again from just six yards on the quarter-hour, while Zozulya gave warning for the visitors when he nodded just wide.
After 33 minutes Dnipro were level.
Michael Odibe headed a corner on to Fedetskiy, who was able to slot home from close range.
Cavani, as expected, had Napoli's best chance to restore the lead before the break but could not keep his header down.
After 52 minutes, Napoli were behind following an Eduardo Vargas error.
His mistake allowed the ball to break for Zozulya, who defeated goalkeeper Antonio Rosati with his 20-yard effort.
Mazzarri immediately sent on two substitutes and one of them, Marek Hamsik, was instrumental in the comeback.
The equalising goal was all about Cavani though, a wonderful 25-yard free-kick in the 77th minute.
That looked to be enough for a draw but Napoli had other ideas, with Hamsik coming to the fore as he teed up Cavani for his hat-trick goal in the 88th minute.
Amazingly, the duo had not yet finished with their opponents and almost three minutes of added time had been played when Hamsik's pass was volleyed home by the irrepressible Cavani.