Dortmund nearly had a catastrophic home leg of the Europa League round of 32, but Michy Batshuayi's two second-half goals have the German side in front.
Borussia Dortmund beat Atalanta 3-2 after Michy Batshuayi's fifth goal in three games sent his new club to their first European win of the season.
Josip Ilicic's double had given the Italians the advantage, but the on loan Chelsea striker continued to prove life isn't all doom and gloom without Pierre-Emerick Aubameyang.
Marco Reus continued his quest for match fitness but proved his rustiness after a long injury lay off. He had the first real opportunity of the game but dragged his shot wide when running through one on one with Etrit Berisha.
Atalanta really should have gone 1-0 up in the 13th minute. Mattia Caldara peeled off at the back post from a corner but diverted his free header wide from six yards out to the astonishment of the 5,000 away supporters.
Andre Schurrle had a shot that was wickedly deflected off of former Middlesbrough man Maarten De Roon but bounced just the wrong side of the post for the German winger. Schurrle had another effort in the 28th minute which looked destined for the bottom corner, but Berisha made a smart save down to his right.
The former Chelsea man finally scored two minutes later. Lukasz Piszczek fizzed the ball into the box for Schurrle to control and flick underneath the onrushing goalkeeper, giving Dortmund the lead with only his second goal all season.
Atalanta started the second half brightly and were rewarded in the 51st minute. A deep ball to the back post was inexplicably missed by Jeremy Toljan when the wing back misjudged the flight of the ball and allowed llicic to ghost in and coolly finish across the goalkeeper and into the opposing side of the net.
It could have been even worse for Dortmund a minute later when replays showed Omer Toprak clumsily making contact with Ilicic in the penalty area but the referee missed it. It then did get worse.
Ilicic grabbed his second goal of the game just five minutes after his first. Bryan Cristante raced down the left hand side and fired the ball at Roman Burki who inadvertently turned it into the Slovenian attackers path for a tap in. The Swiss goalkeeper will be disappointed he wasn't able to palm the ball further towards safety.
Atalanta weren't in front for long though as Batshuayi continued his invigorated run of form for his new club. The on loan Chelsea striker cut inside of his man and rifled the ball past Berisha from outside the box to draw the two sides level.
Dortmund did well to shore up their defense and even managed to grab a winner in the dying moments. Substitute Mario Gotze played the ball into Batshuayi who took the ball brilliantly into his path on the back foot and fired the ball into the bottom left-hand corner.
The Belgian's last minute winner means Dortmund have the advantage when the two teams meet again next Thursday to decide who progresses through to the round of 16.