A deflected goal from Claudio Marchisio was enough for Juve and Ranieri said afterwards: "It was important to win after the Champions League game and it isn't easy to get back that determination and concentration.
"The lads had a great first half, but then Napoli lost that initial tension and threw everything they had at us. Nonetheless, [Gigi] Buffon had precious little to do.
"It was difficult as Napoli closed up all the spaces and tried to hit us on the break, we were fortunate to get that goal right before the break."
Marchisio has been one of the more impressive young players and Ranieri praised those who have kept Juventus afloat during an injury crisis.
"The season we've had has seen all the lads make their contribution. If we are where we are it is thanks to all those relatively new players who put the effort in when others were injured and I thank them for their contribution.
"Marchisio and [Christian] Poulsen put a lot of work in and closed down the Napoli attacks brilliantly. They really protected the defence in a quiet but decisive system to close down [Ezequiel] Lavezzi."
There was more bad news, as Nicola Legrottaglie limped off the field with a suspected sprained knee.
"Legrottaglie said he sprained his knee. We'll test it tomorrow and I hope it's nothing too serious, but he did ask to leave the pitch."