After a 1-1 draw in normal time, spot-kicks were required to separate the sides and it was City - inspired by the impressive Angus Gunn and a vocal home following - who triumphed.
The hosts had looked to be sailing through to the next round, thanks to Jack Byrne’s sixth goal in seven games in the tournament but a last-gasp deflected Christian Sivodedov strike rescued a draw for the visitors, sending the tie to penalties.
Having surrendered their lead so late on in the game, it was feared the blow would affect the home side going into the shoot-out but the young Blues showed character to bounce back and clinch a 3-1 shoot-out victory.
After the game, manager Patrick Vieira told the official website he felt the better side won but admitted it wasn’t the fluid performance expected of his side, who headed into the clash with a 100% record in the group stage.
In a tight contest of limited clear-cut chances but plenty of strong challenges, City struggled to retain possession against a team they had already faced - and swept aside with ease - earlier in the season.
The German side were the first opponents to grace the Academy Stadium in a competitive fixture back in January but on that day, the Blues were 3-0 up inside 22 minutes and went on to secure a 5-1 win in the U21 Premier International Cup.
That wouldn’t be the case this time around. In fact, it was the visitors who looked far more threatening for much of the opening period.
City could have found themselves a goal down inside five minutes, as Leroy Sané - a constant threat throughout - burst forward and squared for Fabian Reese, whose first-time effort trickled wide.
Hampered by an early injury to Mathias Bossaerts, it took the hosts a while to get into the game. Schalke looked more likely to break the deadlock and it took a fine fingertip save from Gunn and a fortunate poke wide from the resulting corner to shock the hosts into life.
The decisive moment in the half arrived just after the half-hour mark as City took the lead against the run of play and with a hint of luck.
Found by Thierry Ambrose, who made his return from injury, Byrne found himself a yard of space just outside the penalty area before unleashing a powerful effort that proved too fierce for Janik Schilder to cope with and crashed into the back of the net.
It was the Blues’ only shot on target in the first half and they made the most of it. The young goalkeeper could have perhaps done better but with the advantage, the hosts grew in confidence and almost doubled it four minutes before the break with an excellent counter-attacking move.
Jose Angel Pozo was involved, collecting the ball on the half-way line before showing excellent vision to pick out Brandon Barker. The winger produced a trademark dribbling run to create a shooting position before crashing the ball against the post.
Reese then spurned another effort for the visitors, heading wide in what proved to be the last action of the half.
After the break, City had all the possession in the early stages but were unable to build momentum as the second period was littered with stoppages and cautions.
Substitute Ashley Smith-Brown’s audacious overhead kick attempt on 56 minutes was a rare effort as neither side really tested the goalkeepers.
As the clock ticked down though, Schalked rallied in search of an equaliser. Sané curled straight into Gunn’s arms and substitute Maurice Multhaup fired an effort just over the bar.
Having lost their first game heavily in Group G, the German side had responded with five successive wins to reach this stage - and their resilience was evident once again in the dying embers of this tie.
In injury time, last year’s semi-finalists struck a killer blow as poor defending from the home side allowed the visitors to get a cross in.
The delivery caused havoc in the Blue penalty area once again and the ball eventually fell for Sivodedov to hit, taking a huge deflection to cruelly fly past Gunn and level the scores.
With little time left for either side to find a winner, the clash was sent to penalties. Goalscorer Byrne stepped up for the Blues’ first, tucking the ball away confidently before Multhaup hit the bar for the away side.
Substitute Bersant Celina then despatched his spot kick, while Gunn saved well from Maurice Neubauer to give City a 2-0 lead.
Pozo then netted from 12 yards, as did Schalke’s Sané - but Angelino‘s effort was thwarted by Schilder to keep Schalke in the contest.
That miss didn’t matter though as Gunn gained revenge for the last-minute equaliser by denying Sivodedov, securing City’s passage to the last eight, where they will travel to Roma.