Jose Callejon put the visitors in front in the 12th minute, but Giuseppe Rossi levelled from the penalty spot.
Dries Mertens completed the scoring 10 minutes before half-time before both sides lost men to red cards, Christian Maggio for the visitors and Juan Cuadrado for the hosts, as Fiorentina lost at home for the first time this season.
Fiorentina started well with Cuadrado and Manuel Pasqual both sending in early sighters before Napoli's first dangerous attack of the game resulted in the opening goal.
Gonzalo Higuain lifted the ball into the area with the outside of his right boot, picking out the unmarked Callejon to the right of goal, and he volleyed the ball sweetly into the opposite corner.
Fiorentina continued to attack as they had done before the goal and their efforts resulted in a penalty when two Viola players went to ground inside the penalty area and the referee saw something untoward, pointing to the spot.
Rossi stepped up and, with a delay in his run, picked the opposite corner after Pepe Reina had already committed himself to dive to his left.
Napoli were quick to regain the lead, showing great efficiency with Mergens exchanging passes with Higuain before sending in a low left-foot shot into the bottom right-hand corner.
Borja Valero nearly replied immediately when he got a lucky rebound on his way through the Napoli defence, but Reina closed him down and made the save.
The Spanish goalkeeper became increasingly important as the game wore on, denying Valero again and then Rossi in the second half as the hosts searched for an equaliser.
Rossi also dragged a shot across goal as Vincenzo Montella's side dominated the proceedings.
A red card for Maggio, for a second bookable offence, gave Fiorentina a one-man advantage for the final 10 minutes of the game.
They lost that going into stoppage game when Cuadrado received his second yellow card, both for dives, and Fiorentina lost the game amid fierce protests that a penalty had not been given.