Juventus need one point from their last two games to win the Serie A title for a seventh straight season after Napoli were held by Torino.
Dries Mertens gave the hosts the lead with a tap-in on his 31st birthday.
Daniele Baselli equalised for the mid-table visitors before substitute Marek Hamsik restored Napoli's advantage with a shot from outside the area.
However, Lorenzo de Silvestri's late header all but ended Napoli's title hopes with two games to play.
Juve are six points clear with matches away to fourth-placed Roma on 13 May and at home to relegated Hellas Verona on 20 May to go. The leaders also have a far superior goal difference.
Napoli were a point behind Juve after beating the leaders 1-0 on 22 April. But they have picked up just one point from two games since.
Their final two games are away to ninth-placed Sampdoria on 13 May and at home to relegation-threatened Crotone on 20 May.