Dortmund, who defeated nine-times European champions Real Madrid in the competition on Wednesday, were bullied by the hosts for much of the first half before bouncing back.
Freiburg hit the post in the first half while the unmarked Fallou Diagne also sent a header over the bar.
Dortmund found their passing game in the second period and missed a string of early chances including a point-blank volley from Goetze.
The visitors then broke through when Subotic, with his back to goal, headed in a curling Marco Reus free kick in the 54th minute.
Germany international Goetze made amends for his earlier miss with seven minutes to go, picking up a Robert Lewandowski pass inside the box to slot the second goal and lift Dortmund up to fourth place with 15 points, five behind Schalke.
"I don't know if the undersoil heating was working on full power," Dortmund sports director Michael Zorc said after his team bounced back after the break to claim their first away win of the season.
Ruhr valley rivals Schalke 04 leapfrogged into second place with a 1-0 win over Nuremberg courtesy of a Jefferson Farfan goal to complete a memorable seven days for them during which they also beat Dortmund as well as Arsenal in the Champions League.
VfL Wolfsburg, who sacked coach Felix Magath on Thursday, got their first win after eight games to move off the bottom under interim coach Lorenz Guenther Koestner with a 4-1 demolition of Fortuna Dusseldorf.
Dutchman Bas Dost struck twice for Wolfsburg who had scored only two goals in their previous eight matches.
A hat-trick by Hungary international Adam Szalai - his first in the Bundesliga - steered Mainz 05 to a 3-0 victory over troubled Hoffenheim to move into fifth place, a point behind Dortmund.
Forward Nils Petersen's goal on the stroke of half-time rescued a 1-1 draw for Werder Bremen at promoted Greuther Fuerth who slipped to the bottom of the table on six points.
Leaders Bayern Munich, on a maximum 21 points after winning all eight games so far, host Bayer Leverkusen on Sunday. Eintracht Frankfurt, on 19, can reclaim second spot with victory at VfB Stuttgart.