Lorenzo Insigne put the visitors ahead with a brilliantly hit first-time effort from outside the box.
Pedro levelled for Lazio with two minutes to go but Ruiz popped up at the end to hammer in from 25 yards and spark mass celebrations.
Luciano Spalletti’s side took advantage of AC Milan and Inter Milan both drawing on Friday.
They now top Serie A by virtue of their head-to-head record with Milan. Defending champions Inter, who are two points behind, have a game in hand.
Napoli’s only two Serie A titles came when Diego Maradona was at the club – in 1987 and 1990.
Elsewhere, Tammy Abraham’s 98th-minute goal gave Roma a 1-0 win at Spezia. He has now scored 12 Serie A goals, the most by an English player in a campaign since Gerry Hitchens for Torino in 1962-63.