Die Adler sat in third place in the tightly-fought section before Tuesday's fixtures and went behind to an Arthur Gomes strike before the break to leave their qualification hopes hanging by a thread.
However, Daichi Kamada's penalty and Randal Kolo Muani's strike turned the game on its head as the Bundesliga giants confirmed a place in the last-16, while Tottenham Hotspur's last-gasp win over Marseille meant that the hosts dropped down to the Europa League spot.
Neither side was able to assert any sort of dominance in the early exchanges, with just a couple of half-chances at both ends to write home about, but Kevin Trapp did have to be alert to keep out Marcus Edwards's volley at his near post.
The hosts then suffered a blow as left-wing back Nuno Santos had to come off on a stretcher just past the half-hour mark after sustaining an apparent foot injury, with Matheus Reis coming on in his place.
Watching their stricken teammate leave the field did not impact Ruben Amorim's side that much, as the hosts netted the all-important opening goal in the 39th minute, as the ball fell kindly for Gomes after a deflected cross, and the 24-year-old's side-footed volley struck Trapp before nestling into the back of the net.
With Marseille beating Tottenham Hotspur 1-0 at half time, Sporting would progress to the last-16 as group winners if the scorelines stayed the same, but the hosts were hit with blows on and off the field in a dismal two-minute period.
As fans learned that Tottenham had levelled against Marseille, Sebastian Coates gave away a penalty for handball on the hour mark, and Kamada gratefully took the chance to level the contest from 12 yards with an emphatic effort into the top corner, sending Antonio Adan the wrong way.
Suddenly, the momentum was with the visitors, and Glasner's men put themselves in a terrific position to qualify for the last-16 after Kolo Muani powered his way through and rifled home a half-volley from a tight angle to spark wild celebrations in the 72nd minute.
Amorim's side threw the kitchen sink at Frankfurt as they desperately tried to keep their knockout hopes alive, but it was a fruitless endeavour as the visitors held firm to advance.