Andreas Christensen netted 'Gladbach's crucial winning goal on 76 minutes when the ball flew his way after captain Lars Stindl's shot.
Danish defender Andreas Christensen netted 'Gladbach's crucial winning goal on 76 minutes when the ball flew his way after captain Lars Stindl's shot cannoned off a Mainz defender and the centre-back stabbed home.
Mainz have every reason to feel aggrieved as striker Pablo De Blasis poked his shot into the Gladbach goal on 89 minutes after the ball rolled free of Borussia's goalkeeper Yann Sommer following a save.
De Blasis was already off celebrating, but referee Robert Hartmann refused to give the goal, even though replays showed Sommer did not have a glove on the ball when De Blasis kicked it.
"The ball was in my hand, but it all happened very quickly. It was a very difficult decision to make," Sommer told Sky after the final whistle.
To add insult to injury, Hartmann sent off Mainz midfielder Jean-Philippe Gbamin for a second yellow card on 90 minutes.
The result lifts Gladbach up to 12th, a point below Mainz and six from the relegation places, to give them a first Bundesliga win since September 24.
After their 4-0 thrashing at Barcelona in mid-week in the Champions League, Gladbach's sports director Max Eberl said their three Bundesliga games against Mainz, Augsburg and Wolfsburg matter more than the Barca defeat.
But this was another poor performance from Gladbach, whose defence looked shaky, especially in the controversial scene around the disallowed goal.