Lorenzo Insigne’s early penalty looked to have put third-placed Napoli on track to move within two points of league leaders AC Milan with five matches remaining, but El Shaarawy’s late intervention left them four points behind.
Reigning champions Inter Milan are two points behind their city rivals in second place, but with a game in hand.
Luciano Spalletti’s Napoli are hoping to lift a first Scudetto since the second Diego Maradona-inspired triumph in 1990, but this bad-tempered draw could prove decisive come the end of the campaign.
The point was not much help to the top-four hopes of Jose Mourinho’s Roma, who missed the chance to cut the gap to fourth-placed Juventus to three points.
It has been a potentially ruinous spell for Napoli, following a 3-2 home loss to Fiorentina last time out.
Napoli took the lead in the 11th minute at the Estadio Diego Armando Maradona after Hirving Lozano ran onto a ball into the box and was challenged from behind by Roma defender Roger Ibanez.
The referee initially did not award a penalty, but after a VAR review, he pointed to the spot and Insigne picked out the bottom corner to score his ninth league goal of the season.
The home side could have doubled their advantage in the 20th minute, but Victor Osimhen’s shot was blocked by Chris Smalling and visiting goalkeeper Rui Patricio pushed away Lozano’s follow-up effort.
Roma almost equalised against the run of play before half-time as Osimhen flicked Lorenzo Pellegrini’s free-kick against his own crossbar.
England striker Tammy Abraham had a chance to level on the hour mark, but he mistimed a close-range header.
A tense match threatened to boil over with four players booked in less than 20 second-half minutes.
Roma started to look dangerous going forwards and were furious that they were not given a penalty when Nicolo Zaniolo was tackled by Napoli ‘keeper Alex Meret.
The referee showed a red card to substitute goalkeeper Daniel Fuzato on Mourinho’s bench in the aftermath.
Osimhen had an opportunity to put the game to bed late on as he bore down on goal, but the Nigeria striker poked into the side-netting.
Spalletti decided to replace Osimhen and Insigne late on and that proved costly.
Abraham’s flick found substitute El Shaarawy who fired a low shot into the bottom corner in the first of eight minutes of added time.
The momentum was all with the visitors, but Napoli at least held on for a disappointing draw.