Austria Vienna, having apparently squandered their chance by conceding three goals at home to Dinamo Zagreb, produced a late rally to go down 3-2 and qualify for the first time while Steaua edged Legia Warsaw on away goals in another topsy-turvy match.
In contrast, Arsenal, as expected, cruised into the group stage for the 16th time in a row, beating Fenerbahce 2-0 at the Emriates with two Aaron Ramsey goals to complete a 5-0 aggregate win, and FC Basel made equally light work of Ludogorets Razgrad.
The Swiss champions, who did the hard work by winning 4-2 in Bulgaria last week, duly won the return 2-0.
The five qualifiers will earn handsome payouts as each of the 32 teams in the group stage receive a basic fee of 8.6 million euros plus a million euros for each win and half a million for each draw.
They also stand to receive further income from UEFA's television rights and sponsorship pool.
Schalke, held 1-1 at home by PAOK last week, knew they were in for a tough time in Greece, even though the match was played behind closed doors because of crowd trouble at a Europa League qualifier last year.
Adam Szalai gave Schalke the lead just before halftime but it all went wrong for the Germans when Stefanos Athanasiadis rifled home a 53rd minute equaliser and Jermaine Jones was dismissed for a second yellow card in the 64th.
Julian Draxler came to their rescue when he sprinted on to Max Meyer's through ball to score from a narrow angle in the 67th, but PAOK revived their hopes when Kostas Katsouranis flicked a back header into the net with 11 minutes left.
Schalke finally settled the tie in the last minute when Draxler set up Hungary forward Szalai to score from close range.
"We make it difficult for ourselves," said Schalke coach Jens Keller. "We let too many goals in these days. These are mistakes that should not happen. But what matters is that we are through."
Vienna became the first Austrian side to qualify for the group stage in eight years as they survived a torrid evening at home to Dinamo, who sacked coach Krunoslav Jurcic after losing the first leg 2-0.
It looked a formality for the hosts when Florian Mader scored with a deflected free kick in the sixth minute, but instead Dinamo took control and turned the game around before half-time with goals from Marcelo Brozovic and Junior Fernandes.
Fatos Beciraj put the Croatian champions ahead on away goals with a header midway through the second half, although Vienna were not finished and Roman Kienast scored from close range with eight minutes left to send them through.
Steaua Bucharest, who were held 1-1 at home by Legia Warsaw in the first leg, took advantage of a calamitous opening by the Polish side to go 2-0 ahead in only nine minutes.
Nicolae Stanciu turned his marker and placed the ball into the bottom corner in the seventh and Federico Piovaccari poked the ball under Dusan Kuciak two minutes later after Legia lost possession in midfield.
Legia were not finished though and, after having a goal disallowed, they pulled one back before the half-hour with a powerful Miroslav Radovic header.
However, they then ran out of ideas and by the time Jakub Rzezniczak scored in stoppage time it was too late.
Legia's distraught players laid on the pitch for several minutes after the final whistle having blown a golden chance to qualify for the first time since 1995.
Basel's Fabian Frei and Philipp Degen each scored following corners as the Swiss side qualified for the fourth time.