Niko Kovac's side seemed set to cruise to victory at the Allianz Arena on Saturday, with goals from Robert Lewandowski and Leon Goretzka earning a 2-0 half-time lead.
But Jonathas swiftly halved Bayern's advantage with a penalty given after a VAR check for handball against Jerome Boateng, although the Hannover striker let his team down by getting sent off within four minutes of his goal.
The 10 men struggled to contain Bayern thereafter and Franck Ribery hit the third with seven minutes to go - leaving Dortmund needing a win to keep pressure on the leaders when they go to Werder Bremen later on Saturday.
Genki Haraguchi sent an early header off target for Hannover while Kingsley Coman and Lewandowski also failed to make the most of aerial opportunities in the opening exchanges.
But the league leaders broke the deadlock in the 27th minute, a typically pinpoint right-wing cross from Joshua Kimmich powered past Michael Esser by Lewandowski.
Esser made good saves to keep out drives by Thomas Muller and Boateng but he could do nothing about Bayern's second goal, a superb 25-yard curler from Goretzka that nudged the post on its way across the line.
Goretzka could have added two more before the break as Bayern continued to push for goals, however Hannover cut the deficit from the penalty spot in the 51st minute.
Boateng blocked a cross with his arm and half-time substitute Jonathas sent Sven Ulreich the wrong way.
Hannover's hope was short-lived, though, as Jonathas was dismissed in the 55th minute. The striker had been booked for a scuffle with Ulreich after scoring the penalty and was shown a second yellow then a red after catching Kimmich with his arm.
Goretzka went close again, but Kovac's side successfully shifted the spotlight to Dortmund with substitute Ribery adding a deflected third to make sure of the points before his fellow veteran winger Arjen Robben made a late cameo – a first appearance since November following a long-term injury lay-off.
What does it mean? Seventh straight title in sight
Bayern stumbled a little with a 1-1 draw at Nurnberg last time out but returning to winning ways has tightened their grip on the title race as they seek a seventh consecutive Bundesliga crown. Dortmund have it all to do after last weekend's shock Revierderby defeat at home to Schalke.
As for Hannover, they are all but relegated with six points to make up on Stuttgart, who are in the play-off place, and only two matches still to play for Thomas Doll's men.
Kimmich on the mark again
Only Dortmund winger Jadon Sancho has recorded more assists in the Bundesliga this season than the consistently outstanding Bayern right-back Kimmich. His cross for Lewandowski's opening goal was almost undefendable.
Jonathas' moments of madness
To get sent off less than 10 minutes after coming on as a substitute is pretty silly but, given Jonathas had also given his side a lifeline from the penalty spot, his hot-headed cameo was even more brainless.
Getting a cheap booking for clashing with Ulreich was needless and left him vulnerable. He might argue he struck Kimmich accidentally, but the damage was done. Nobody has ever come on as a Bundesliga substitute, scored and been sent off in such quick time.
Key Opta Facts
- Bayern Munich's Joshua Kimmich provided his 12th assist this Bundesliga season – increasing his personal best.
- Bayern have won all 18 Bundesliga games where Kingsley Coman had a hand in a goal.
- Hannover's Jonathas produced a new Bundesliga record – he is the fastest player to be subbed on, to score a goal, and to be sent off within only nine minutes, three seconds.
- Bayern's Rafinha made his 500th appearance in all competitions for European sides – 265 of them for Bayern.
- Bayern faced only two shots – the lowest number for a team in a Bundesliga game this season.
Bayern go to third-placed RB Leipzig next Saturday, potentially their toughest remaining league game and a warm-up for the DFB-Pokal final between the two clubs. Hannover's desperate fight against the drop continues when they host Freiburg on the same day.