In a first half which included very few clear chances, it was Inter who looked the more dangerous as the lively Mauro Icardi headed wide from a good position.
Napoli struggled to create much early in the game, but improved as the first half progressed and went close to opening the scoring when Samir Handanovic was forced to get a hand on Marek Hamsik's strike from the edge of the box.
© Getty Images
An extended spell of Inter pressure before the interval almost brought the breakthrough as Hernanes struck the post after latching onto the ball inside a congested penalty area.
Napoli then tested the strength of the woodwork early in the second half when Lorenzo Insigne powered a shot against the post with Handanovic looking helpless in the Inter goal.
Jose Callejon threatened to break the deadlock in spectacular fashion just after the hour mark, but his swerving effort from 25 yards was pushed away by Handanovic.
The Spaniard would take full advantage of his next opportunity with 12 minutes remaining by latching onto a poor clearance from Nemanja Vidic before picking out the bottom corner with an emphatic finish.
Walter Mazzarri's side hit back four minutes later when Fredy Guarin, who was introduced immediately after the opening goal, arrived at the back post to help Icardi's header beat a stranded Rafael Cabral.
Callejon restored his side's lead in the 90th minute when he met a cross from David Lopez with a firm volley to hand Napoli what appeared to be a match-deciding lead.
However, the drama was not over until the first minute of stoppage time as Hernanes jumped highest inside a congested penalty area to head home the equaliser from Dodo's cross.