Leaders Dortmund are now eight points ahead of second-placed Bayern and need two points from their final three games to clinch the crown for the second year running.
Jefferson Farfan gave Schalke an early lead in the Ruhr derby but Lukasz Piszczek equalised in the 17th minute of a physical, unattractive game.
Sebastian Kehl took advantage of poor defending to score the winner in the 63rd minute as Dortmund completed the Bundesliga double over Schalke and extended their unbeaten league run to 25 games, a record for a single season.
"It's madness. We couldn't imagine beforehand that we would achieve this," coach Juergen Klopp said of his low-profile Dortmund side.
"Today was a character test of the highest level. But this team is never satisfied and is incredibly greedy."
Bayern struggled to break down mid-table Mainz and their best efforts came late in the first half when Anatoliy Tymoshchuk hit the post and Ivica Olic missed an excellent chance from close range.
The Bavarians, who host Real Madrid in a Champions League semi-final first leg on Tuesday, were jeered off the pitch by an otherwise subdued 69,000 crowd at the Allianz Arena.
Second from bottom Hertha Berlin scored three goals, had a player sent off and survived a penalty miss - all in a 15-minute period during a 3-3 draw at Bayer Leverkusen.
Elsewhere, struggling Hamburg SV secured a much-needed 1-0 victory over Hanover 96 while bottom club Kaiserslautern's 2-0 defeat at home to Nuremberg left them all but relegated.
Augsburg boosted their survival hopes with a 2-1 victory at VfL Wolfsburg.
Dortmund, who last tasted league defeat against Hanover in September, have 72 points from 31 games.
Bayern are on 64 points while Schalke, still on course for a place in next season's Champions League, have 57.
Hamburg, the only ever-present team in the Bundesliga since it was founded in 1963, are 14th on 34 points, one ahead of Augsburg.
Cologne, who visit Borussia Moenchengladbach on Sunday, are in the relegation playoff place in 16th position with 29 points while Hertha have 28 and Kaiserslautern 20.
The 140th Ruhr derby began in dramatic style as Peru forward Farfan picked up a loose ball and fired his shot through a crowd of players to give Schalke a ninth-minute lead.
Piszczek replied eight minutes later, the Pole rifling in a left-foot shot from a difficult angle.
After that the match turned into an ugly, confrontational battle with plenty of bad challenges.
Schalke had the most pressure but Dortmund snatched the winner following a corner when the ball hit home defender Christoph Metzelder on the chest and landed at the feet of Kehl who fired in from close range.
Hapless Hertha looked set for another defeat as Andre Schuerrle and Stefan Kiessling scored either side of halftime to put Leverkusen 2-0 ahead.
That was followed by an amazing spell as Pierre-Michel Lasogga headed a goal back in the 62nd minute followed four minutes later by a penalty for Leverkusen which also resulted in a red card for Hertha's Levan Kobiashvili.
Simon Rolfes then saw his spot kick saved by Thomas Kraft, Eren Derdiyok went wide with the rebound and five minutes later Tunay Torun pulled Leverkusen level.
In the 77th minute Raffael pounced on a dreadful backpass by Tranquillo Barnetta and laid the ball back for Torun to strike again.