Lucien Favre's men conceded a league goal for the first time in four games but did enough to inflict Monchengladbach's first defeat in six and move up to second in the table.
Roman Burki made an important save from Florian Neuhaus's goal-bound effort after two minutes to pave the way for Thorgan Hazard to open the scoring.
Hazard collected Erling Haaland's pass clumsily but recovered control in time to turn smartly and drill a left-footed shot home from 12 yards.
Gladbach fought back by creating a flurry of chances and eventually got their reward when Alassane Plea volleyed Jonas Hofmann's corner towards goal five minutes into the second half and Lars Stindl was on hand to poke the ball home from close range.
Yann Sommer made a superb save from Hazard to keep the scores level but there was nothing he could do to prevent Achraf Hakimi netting the Dortmund winner after 71 minutes.
The Real Madrid loanee latched onto Jadon Sancho's through-ball and fired low into the corner of the net to seal the points.