Bayer Leverkusen thumped bottom club Greuther Fuerth 4-1 to take third place from Leipzig and move three points clear of fifth-placed Freiburg in the race for the top four.
Freiburg missed the chance to draw level on points with Leipzig, conceding a late equaliser in a 3-3 draw with Borussia Moenchengladbach.
Union are just two points further back in sixth, with five clubs, including seventh-placed Cologne, separated by just six points with three games remaining in the battle to reach next season's Champions League group stage.
"I'm incredibly proud that the lads rewarded themselves at the end, they showed incredible morale," said Union head coach Urs Fischer.
Yussuf Poulsen put Leipzig ahead early in the second half at the Red Bull Arena to put the hosts on course for their second win in four days over Union, who they beat 2-1 in the German Cup semifinals on Wednesday.
However, Union avenged the cup defeat as substitutes Sven Michel and then Kevin Behrens scored in the 86th and 88th minutes.
"Despite six changes, Union were more aggressive and more gallant, they looked fresher and more agile," admitted Leipzig coach Domenico Tedesco.
"If you're leading 1-0 in the 86th minute, you shouldn't then lose."
The defeat ended Leipzig's unbeaten run of 15 games in all competitions, ahead of their Europa League semifinal, first leg at home to Rangers on Thursday.
Union are bidding to reach the Champions League for the first time in just their third season since being promoted to the Bundesliga.
Freiburg, also hoping for a maiden appearance in Europe's premier competition, looked set to pile the pressure on Leipzig as they fought back from 2-0 down at halftime to lead Gladbach.
But Lars Stindl struck for the visitors in the third minute of injury time.
Freiburg face Union Berlin and Leverkusen in their final two matches of the season.
Fuerth were finally relegated after their loss to Leverkusen, having been last in the table since September.
"It's not that I'm surprised that we're relegated, but when it happens, it still hurts," said tearful Fuerth general manager Rachid Azzouzi.
Eintracht Frankfurt, who visit West Ham on Thursday in their Europa League semifinal first leg, conceded a late equaliser to draw 2-2 at home to Hoffenheim.
Frankfurt defender Evan Ndicka turned the ball into his own net, then scored for the hosts before Japan midfielder Daichi Kamada put Eintracht 2-1 up with an hour gone, but Georginio Rutter levelled for Hoffenheim.
"The result is okay," said Frankfurt coach Oliver Glasner.
"For me, it was important to see that the players are focused on the here and now. We're looking forward to West Ham."
Later, league leaders Bayern Munich can be crowned champions for a 10th straight season if they beat second-placed Borussia Dortmund at the Allianz Arena.