Second-placed Leipzig moved within a point of Bayern, who play Stuttgart on Saturday, and next face the reigning champions in the league on 3 April.
Leipzig fought back with second-half goals by Christopher Nkunku and Yussuf Poulsen before Sorloth's winning header in the 93rd minute after Gladbach had led 2-0 at half-time.
Bayern suffered a 2-1 defeat at Eintracht Frankfurt on Saturday following a 3-3 draw against strugglers Arminia Bielefeld upon their return from winning the Club World Cup in Qatar 11 days ago
Bundesliga: Wolfsburg strengthen chances of Champions League qualification with 3-0 win over Arminia Bielefeld
Renato Steffen scored twice, and a rocket from Maximilian Arnold helped Wolfsburg move third ahead of rest of the 22nd round.
Bundesliga: Eintracht Frankfurt back to fourth spot with Hoffenheim win; Werder Bremen-Arminia Bielefeld match postponed
Filip Kostic steered Eintracht Frankfurt back to fourth in the Bundesliga with a 3-1 win at Hoffenheim on Sunday, as the day's late game was called off due to a heavy snowstorm sweeping across Germany.
Bundesliga: Wolfsburg beat Freiburg to rise to third in table; Marius Wolf's brace helps Cologne win
Wolfsburg climbed above Bayer Leverkusen, Borussia Dortmund and Eintracht Frankfurt to move firmly into contention for Champions League qualification.
Bundesliga: Robert Lewandowski’s penalty helps Bayern Munich consolidate lead; Arminia Bielefeld beat Stuttgart
Bayern Munich stayed four points clear of Leipzig, who earned a hard-fought 1-0 victory over Union Berlin thanks to Emil Forsberg’s 70th-minute strike.
Bundesliga: Bayern Munich stay top of table after thrilling draw against Leipzig; Frankfurt hold Dortmund
Arminia Bielefeld held on for just their second win, a 2-1 victory at home over relegation rival Mainz.
Lewandowski, who played for Dortmund between 2010 and 2014, took his tally to 17 goals in 13 games against his former club. He also clocked up his 11th goal in just six Bundesliga appearances for Bayern so far this season.
Bundesliga: Borussia Dortmund dig deep to edge past Hoffenheim; Bayern Munich defeat Arminia Bielefeld
Borussia Dortmund needed substitutes to dig them out of a hole for a 1-0 win against Hoffenheim, while Bayern Munich had no such difficulties as they romped to another Bundesliga rout on Saturday.
Dortmund had three times as many shots on goal and dominated with 80 percent possession, which left their Swiss coach Lucian Favre to admit, "we are very disappointed, it's hard to accept this defeat".