In the all-Bavarian affair on a terrible pitch in Munich, Ingolstadt stunned the Allianz Arena by taking a shock early lead, with Dario Lezcano poking the ball beyond the advancing Manuel Neuer.
Ingolstadt's lead lasted all of four minutes as Robert Lewandowki capitalized on poor defending and leveled with a delicious chip over Orjan Nyland.
Ingolstadt survived until half-time with the scores level, but Xabi Alonso put Bayern ahead with a rasping drive from 20 yards, which flew into the bottom corner. Rafinha made the win safe, slamming in a low shot.
The visitors missed chances to draw level and Carlo Ancelotti, who welcomed back Renato Sanches to the starting line-up and played a central defensive partnership of Joshua Kimmich and Javi Martinez, will not be entirely satisfied with the performance.
Gonzalo Castro finished off a slick move to give Dortmund an early lead, which they took into the break.
Dortmund went up a gear after the restart and Adrian Ramos doubled their lead with a neat finish on the rebound, with Christian Pulisic adding a third soon after.
To make matter worse for the visitors, they had Peter Niemeyer sent off for a reckless challenge on Ramos, before Castro and Sebastian Rode flicked in a fourth and fifth with almost identical finishes.
Emre Mor added a sixth late on from a second Pulisic assist, compounding Damstadt's misery.
Andre Schubert would have been ecstatic with the manner in which his team bounced back from a heavy defeat at the hands of Manchester City earlier in the week.
Early goals from Thorgan Hazard and Raffael proved more than enough to compound further anguish on a troubled Werder Bremen side.
A wonderful volley from former Arsenal starlet Serge Gnabry late in the second half suggested there was life in the bottom-placed side yet, but a red card for Aron Johannsson just three minutes later quickly dispelled any hope of a late comeback from Viktor Skripnik’s side.
Bremen stay last in the Bundesliga table as Gladbach move up to sixth place.