Lucien Favre's side looked set to keep its bid for glory on track when Jadon Sancho brilliantly created Mario Gotze's early goal but Daniel Caligiuri converted a somewhat controversial 18th-minute penalty.
Salif Sane gave Schalke the lead before the half hour with a thumping header from a corner and Caligiuri scored a magnificent free-kick in between red cards for Dortmund captain Marco Reus and Marius Wolf as Dortmund imploded at a remarkable rate.
Axel Witsel pulled one back five minutes from time but Breel Embolo lashed another fine finish into the bottom corner from distance, sparking more delirious celebrations from the travelling Schalke contingent.
Bayern will go four points clear at the summit with three games to play if it beats struggling Nurnberg on Monday (AEST).
For Schalke, this result sees it stave of the threat of relegation, a vital three points keeping it clear of the dreaded drop zone.