Juventus had two late goals from Angel Di Maria and Dusan Vlahovic disallowed before Raspadori came up with the last-gasp winner for the visitors, who have moved 17 points clear at the top of the table.
The Old Lady, meanwhile, remain third, three points ahead of fifth-placed AC Milan in the race to secure Champions League football for next season.
Hours before booking their spot in the semi-finals of the Europa League on Thursday, Juventus learned that their 15-point deduction in Serie A from earlier this year had been overturned, which saw them move into third spot in the division.
The penalty, which had been handed out following an investigation into the club's transfer dealings, was reversed pending a new trial to further clarify their capital gains controversy, and it is unlikely that a decision will be made until next season, so their top-four hopes have been handed a substantial boost.
The news was even more welcome considering that the Old Lady had lost their last two league games against Lazio and Sassuolo, but they were unable to pick up a positive result against the division leaders.
Juventus had the first half-chance of the match in the third minute when Manuel Locatelli found space on the edge of the box, but his effort was always moving wide of the post.
Juan Cuadrado was next to try his luck for the Old Lady in the 11th minute, with his drive from distance well saved by Napoli goalkeeper Alex Meret, before Tanguy Ndombele fired over the crossbar down the other end after smart work from Hirving Lozano.
Arkadiusz Milik then tested Meret with a header in the 16th minute, as Juventus continued to look the more likely to make the breakthrough in the Serie A affair.
Napoli failed to register a shot on target in the opening 45 minutes; the league leaders actually had to wait until the 51st minute to test Wojciech Szczesny, with Giovanni Di Lorenzo heading straight at the Juventus goalkeeper.
The visitors had a huge chance to take the lead in the 70th minute when Di Lorenzo combining with Elif Elmas before the ball was played into Victor Osimhen, but the striker's goal-bound effort was just deflected wide of the post.
Osimhen then saw his header from the resulting corner kept out by the Juventus goalkeeper, before the Nigerian - from his third opportunity in quick succession - directed an effort from a Di Lorenzo cross high over the crossbar.
Juventus had the ball in the back of the Napoli net in the 83rd minute through Di Maria, who beat Meret with a deflected strike, but the goal was disallowed following a VAR check for a foul earlier in the attack.
The Old Lady then beat Meret once again in second-half stoppage time through Vlahovic, but the Serbian also saw his effort chalked off, with the ball rolling over the byline before he converted a cross from Federico Chiesa.
Napoli won the match in incredible fashion in the 93rd minute, as Raspadori, who had only entered the field in the 86th minute, converted a Elmas cross at the far post through the legs of Szczesny.
Juventus are next in action away to Bologna next Sunday, while Napoli will be bidding to strengthen their grip on first position when they host Salernitana on the Saturday.