The visitors rose into an early lead, thanks to Charles Pickel’s brilliant finish in the 18th minute after being set up by David Okereke.
However, quick-fire goals from Juan Jesus and Giovanni Simeone saw Napoli turn the game around and take a 2-1 lead into the halftime break.
Afena-Gyan replaced Okereke in the 65th minute and went on to grab a late equaliser to send the game into extra time.
The 19-year-old striker then scored the winning penalty as Cremonese run out as 5-4 winners in the shootout against the Setie A leaders.
“A fantastic team effort tonight. Congratulations @USCremonese for qualifying to the next stage of the #CoppaItalia. If we believe, we can achieve,” he later wrote on Twitter.
The Ghanaian youngster has now taken his tally for the season to two goals, both of which have come in the Coppa Italia, since joining Cremonese.
Meanwhile, Cremonese will also now face Afena-Gyan’s former club AS Roma in the quarter-finals of the Coppa Italia.