Bayern and Leipzig are set to meet at Munich's Allianz Arena on December 21.
Carlo Ancelotti's Bayern had regained the lead with a 3-1 win at Mainz on Friday night, but Leipzig replaced them less than 24 hours later.
Bayern and Leipzig are set to meet at Munich's Allianz Arena on December 21 in a mouth-watering pre-Christmas showdown.
A second-half own-goal from Schalke's Bosnia international Sead Kolasinac sealed Leipzig's win, their 10th league victory, extending their record unbeaten run to 13 matches in their first Bundesliga season.
Leipzig took an early lead in controversial fashion as Schalke goalkeeper Ralf Faehrmann conceded a penalty with just 19 seconds gone when the referee judged he had made contact with RB's top scorer Timo Werner.
Replays showed the Leipzig forward dived, but Werner, 20, drilled in his eighth league goal of the season. Faehrmann was booked to add insult to injury for Schalke.
Werner insisted he told referee Bastian Dankert -- who later admitted he made the wrong decision after watching replays -- that there was no contact from Faehrmann, but went to ground from a push by Schalke defender Naldo.
"I'm sorry that it looks like a dive, that wasn't my intention, but there was a push from Naldo," insisted Werner after watching replays.
"I told the referee there was no contact from Faehrmann, but he didn't listen to me in the heat of the moment."
Long after the final whistle, Faehrmann was still fuming about the incident.
"It's enough to make you sick. Werner told him (Dankert) that there was no contact and I still got a yellow card," said the goalkeeper.
Schalke regained their composure and drew level when Bosnia winger Kolasinac drilled home a cross on 32 minutes.
But the 23-year-old, who has been linked to Liverpool, turned the ball into his own net two minutes into the second half following a free-kick from Leipzig's Emil Forsberg.
Faehrmann tipped the ball onto the bar to deny a header from Leipzig defender Marcel Halstenberg 20 minutes from the end.
With time running out, Schalke's Brazil centre-back Naldo cleared off the line from Forsberg.
This was Schalke's first defeat in 13 games, dating back to the end of September, to leave them eighth.
Earlier, Pierre-Emerick Aubameyang scored twice as Borussia Dortmund prepared for their Champions League clash at Real Madrid with a 4-1 rout of Borussia Moenchengladbach.
With both sides already into the last 16, the victor at Real's Bernabeu on Wednesday will be confirmed as Group F winners and fifth-placed Dortmund warmed-up with an emphatic win over Moenchengladbach at Signal Iduna Park.
Fleet-footed Marco Reus weighed in with three assists as Dortmund fought back after Gladbach took the lead with six minutes gone when Brazilian forward Raffael slotted home from the edge of the area.
Lukasz Piszczek headed home and Ousmane Dembele also netted in the second half to seeal an emphatic win.
Hertha Berlin held onto third with a 3-2 comeback victory at 10-man Wolfsburg as Salomon Kalou converted the winning penalty in the 91st minute.
Wolfsburg coach Valerien Ismael dropped Germany international Julian Draxler from his starting line-up and his side responded with two goals in the opening 20 minutes.
Ex-Real Madrid striker Borja Mayoral gave Wolfsburg a 12th-minute lead before Marvin Plattenhardt put Hertha level by expertly drilling his free-kick over the wall.
Wolfsburg went back in front when midfielder Paul Seguin, who was later sent off for a second booking five minutes from time, slammed his shot home on 18 minutes.
Alexander Esswein levelled for Hertha 20 minutes from time before Daniel Caligiuri fouled Plattenhardt to concede the penalty Kalou converted for the winner.
Hoffenheim, who along with RB Leipzig are the only unbeaten teams in the Bundesliga, are fourth after romping to a 4-0 win at home to Cologne.
Ex-Bayern striker Sandro Wagner scored twice for Hoffenheim while Jeremy Toljan and Mark Uth also got on the scoresheet.
Bayer Leverkusen, who host Group E winners Monaco on Wednesday with both teams through to the knock-out stages of the Champions League, drew 1-1 at home to Freiburg.
Janik Haberer gave Freiburg a shock first-half lead before Hakan Calhanoglu levelled after the break.
Leverkusen's Javier Hernandez failed to convert a late penalty as the Mexico striker fired his spot-kick at the feet of Freiburg goalkeeper Alexander Schwolow.
Werder Bremen climbed out of the bottom three with a 2-1 win at home to Ingolstadt, who are second from bottom, thanks to Fin Bartels' second-half winner.