Macedonia striker Goran Pandev's 86th-minute free-kick was palmed away by Cesena goalkeeper Nicola Ravaglia, but the referee ruled it had crossed the line.
The call was so close that even television replays were unclear, although Cesena's players had no doubts as they angrily protested the decision.
Their 2-1 win in the single-leg tie came on the debut of new signing Eduardo Vargas, a 22-year-old Chilean forward seen as one of the jewels of South American football.
Relegation-threatened Cesena took a first-half led when Stefan Adrian Popescu scored from the edge of the area after poor defending by the hosts.
Vargas, signed after an outstanding year with Universidad de Chile which included a glut of spectacular goals, struggled to strike up an understanding with Edinson Cavani and was taken off at half-time, to be replaced by Pandev.
Napoli equalised in the 65th minute when Pandev's shot was parried by Ravaglia and Uruguay forward Cavani snapped up the rebound for his 15th goal of the season in all competitions.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.