Villarreal, Spain's final representatives in the competition following Sevilla's exit on Wednesday night, looked in some trouble after Napoli capped an impressive start by taking a 17th-minute lead through Marek Hamsik.
That away goal meant Villarreal, having drawn the first leg 0-0 in Italy, would need to score at least twice to avoid tumbling out, but they managed to do just that in a fourth-minute spell before the break.
Nilmar drew the teams level in the 42nd minute before Italy international Giuseppe Rossi saw his deflected shot loop in during first-half stoppage-time.
Villarreal then survived a couple of late scares as Napoli hit the woodwork twice in the closing stages before securing a showdown with Bayer Leverkusen in the next phase.
Napoli must have felt it was going to be their night as they started well, with Ezequiel Lavezzi side-footing a great chance wide with only Diego Lopez to beat in the sixth minute.
Lavezzi then had another sight of goal before the Serie A side took the lead.
Lavezzi curled a cross into the area where three unmarked Napoli players had got in behind the Villarreal defence, and it was captain Hamsik who got on the end of it to send a diving header past Lopez.
As the Napoli players raced over to their fans to celebrate, a small waist-high barrier collapsed under the weight of the supporters in the stands, leading to a number of them falling around five feet onto the side of the pitch.
The re-start to the match was delayed for a few minutes as medical staff attended the supporters.
Soon after play restarted Villarreal went agonisingly close to an equaliser when Borja Valero's thunderous half-volley from the edge of the box fizzed inches wide.
Lavezzi had another great chance to put Napoli in total control in the 27th minute after breaking clean through from the left, but we was denied when one-on-one by Lopez.
Nilmar could only head straight at goalkeeper keeper Morgan De Sanctis in the 38th minute, but four minutes later he made no mistake after being put in by Valero, the Brazilian ace drilling a low shot into the far corner to make it 1-1. Better was to come for the Yellow Submarine though as soon after they get their noses in front thanks to Rossi.
Valero was again involved, powering forward from midfield before feeding the ball out to Rossi, whose shot from just inside the area struck Camilo Zuniga and flew over the helpless De Sanctis and into the net.
That proved to be the match-winning strike, but both sides had chances to add to the scoreline in the second half.
Cani and Nilmar failed to make the most of being wide open inside the area for Villarreal, while Napoli can consider themselves unlucky after twice striking the woodwork.
Edinson Cavani was the first in the 68th minute, his low cross-shot deflecting away off the far post, and then 10 minutes later Lavezzi struck the near post direct from a corner.
Villarreal 2-1 Napoli: Match Report - view commentary, squad, and statictics of the game as it happened.