But Lozano needed only eight minutes on the field to equalise, heading in a Dries Mertens cross.
The Mexican, known as "Chucky," then saw a shot hit the post, before bursting down the right to provide the cross for Andrea Petagna to head in Napoli's winner in the 68th minute.
Napoli's win left them third with 23 points, three behind leaders AC Milan who were at home to Parma later on Sunday. Claudio Ranieri's Sampdoria, who have taken only two points from their last six games, dropped to 13th with 11 points.
Atalanta, who have qualified for the Champions League round of 16, are eighth with 17 points, while Fiorentina are three off the bottom with nine.
Fiorentina have taken one point in four games since Cesare Prandelli returned for a second stint as coach last month.