Marco Reus twice cancelled out Robert Lewandowski goals, but it was Alcacer who struck the decisive blow in the 73rd minute at Signal Iduna Park on Saturday.
Dortmund had a four-point cushion to the Bundesliga champions heading into the clash and their seven-point gap will now give them real hope of a title challenge, although they were spared a last-gasp Lewandowski leveller by a correct offside call.
Bayern coach Niko Kovac insisted pre-match he was not feeling the pressure, but questions may again be asked about his future at the club after their six-game unbeaten run in all competitions ended.
Reus was recalled to the Germany squad this week and the Dortmund captain should have given the hosts an early lead, hitting a one-on-one chance straight at Manuel Neuer, who had conceded each of his last eight shots on target in the Bundesliga.
Bayern punished slack Dortmund defending with the opening goal in the 26th minute, Lewandowski drifting between the centre-backs to head home Serge Gnabry’s right-wing cross.
Dortmund started the second half in similar fashion to the first and equalised from the penalty spot in the 49th minute, Reus beating Neuer from 12 yards after being fouled by the goalkeeper.
But parity lasted only four minutes, Bayern retaking the lead with a breathtakingly beautiful goal.
Gnabry had space to shoot but instead backheeled a cute pass to Joshua Kimmich, the right-back’s floated cross converted from close range by supreme poacher Lewandowski.
The Bayern striker had a hat-trick goal ruled out for offside while the champions rode their luck at the other end, Kimmich brilliantly clearing a Reus shot off the line before substitute Alcacer was halted by Jerome Boateng with the goal at his mercy.
Dortmund levelled again in the 66th minute, though, Reus connecting with a wonderful first-time finish to rifle home a right-wing Lukasz Piszczek cross.
And they snatched all three points as Bayern’s high defensive line was stretched again, Sancho robbing Franck Ribery to start a move that saw Axel Witsel send Alcacer through to chip Neuer.
Bayern thought they had stolen a point in the 95th minute when Lewandowski steered a super backheel past Marwin Hitz, but the goal was rightly disallowed for offside.