A fine solo effort from the Ivorian was swiftly followed by a thunderbolt from Kevin Strootman as the Giallorossi - last year's runners-up - looked to score their way into the cup final once again.
Ambitious Napoli fought back, though, with Gonzalo Higuain halving the deficit shortly after half-time before Dries Mertens dazzled the Olimpico with a superb jinking run and finish.
Then, with time running out, Gervinho lessened the impact of Napoli's two away goals by getting clear at the near post to drive a crucial third goal past the beleaguered Jose Reina.
The teams meet again at Napoli's Stadio San Paolo next Wednesday with Udinese taking a one-goal advantage into the second leg of their semi-final match-up with Fiorentina.
Gervinho got Roma off to a flying start at the end of a dynamic sprint into the Napoli area.
In the 13th minute the Ivorian seized on an inspired through-ball from Francesco Totti to round Reina and tap home.
Totti then threatened Reina himself, his long-range drive stinging the Spaniard's palms before Strootman upstaged his team captain with a blistering strike from distance.
There was not much Reina could do to stop the bullet from 30 yards that Roma's Dutch midfielder hammered into the top corner on the half-hour mark, and Napoli's confidence was shaken.
They regrouped over the break, however, and scored their first away goal two minutes after the restart.
Higuain took the credit as his powerful shot deflected off Mehdi Benatia, and then the fumbling keeper Morgan De Sanctis, before ending up in the Roma net.
The Giallorossi responded brightly to the setback and Adem Ljajic twice went close with shots that rattled Reina's resolve, with Vasilis Torosidis forcing an acrobatic save from the on-loan Liverpool man.
Napoli weathered the storm and equalised in the 70th minute, Mertens twisting and weaving his way into the Roma box before lashing the ball past De Sanctis.
On a night which had seen its share of memorable goals, there was enough time for one more and Gervinho's was perhaps the best of the bunch.
There were two minutes remaining in Rome when the former Arsenal man danced onto Alessandro Florenzi's slide-rule pass.
He took two strides and slammed the ball beyond Reina to give Roma a slender advantage ahead of next week's trip south to Naples.