A goal from Mario Gotze early in the second half was enough to inflict a second home defeat on Bayern, who lost by the same scoreline to Borussia Monchengladbach on the opening day of the season.
Both Dortmund and Gladbach are now Bayern's closest challengers in the table with just two points separating the Bavarians from the two Westphalian sides with four games to go before the winter break.
A win for Bayern would have put them eight points ahead of the defending champions, who are now back firing on all cylinders after recording a sixth victory in their last seven games.
Bayern coach Jupp Heynckes sprang a surprise by naming Arjen Robben in his starting line-up.
But the Dutchman was to see as little of the ball as he would have done from the bench as Dortmund started strongly.
Gotze was inspiring the visitors as they pushed forwards, looking to repeat their 3-1 success at the Allianz Arena last season.
He had two bites of the cherry from a free-kick in the 10th minute with the first handled by a Bayern player in the wall and his second deflected just wide.
Bayern responded with Franck Ribery blazing a shot over in the 29th minute.
Mario Gomez shot wide 10 minutes into the second half with his first chance of the game before Shinji Kagawa missed a glorious chance to put Dortmund in front.
He was put through on goal by Robert Lewandowski, but Manuel Neuer came out on top in in the one-on-one situation with a save similar to the one which earned his side all three points against Augsburg a fortnight ago before Gotze shot wide from the rebound.
Gotze was more accurate with his shot in the 65th minute, though, to put Dortmund in front after exchanging passes with Kagawa.
Lewandowski had the ball in the back of the net again 10 minutes later, but his goal was ruled out for offside.
Bayern had to react as the clock ticked down and Ribery managed to find a higher gear as he raced onto Gomez's pass, but he was denied by an excellent Roman Weidenfeller in the Dortmund goal.
Dortmund defended resolutely and even had some good chances on the counter-attack as Bayern sent everybody forwards in a futile search for an equaliser.