In the final in Berlin on May 23, Stuttgart will now aim to foil a Bayern Munich domestic double, which could become a treble if Vincent Kompany's team wins the Champions League too.
The back-to-back cup finals for Stuttgart couldn't be more different as they will face a record-breaking Bayern who beat Stuttgart 4-2 last weekend.
In last year's final, Stuttgart beat one of the competition's biggest-ever underdogs, third-tier Arminia Bielefeld.
"It's a really tough question. I think just be concentrated, try to make as few mistakes as possible," Stuttgart striker Deniz Undav told Sky Sport when asked how his team can make an upset happen.
"We believe in it. Anything can happen in Berlin. It's one game."
Freiburg's chances of an unusual double ended, but they are still a contender for the Europa League title after reaching the semi-finals.
The game was heading for a penalty shootout when Tomás produced a moment of individual skill. He twisted in the air between two defenders as a pass came in from Badredine Bouanani and used his heel to flick the ball past Freiburg's outstanding goalkeeper Florian Müller.
Tomás celebrated shirtless, holding a corner flag aloft to the crowd, and shrugged off the inevitable yellow card.
Freiburg pushed for another goal and even sent Müller into the attack at a corner but it wasn't enough.
"There's not many words to describe what happened," Tomás said. "I think it's one of those nights. It will stay for me in my lifetime in my memory."
Earlier, Freiburg took the lead when Maximilian Eggestein flicked Matthias Ginter's header past the goalkeeper at a corner in the 28th minute. Soon after having a goal ruled out for offside, Stuttgart pulled level in the 70th when Undav finished off a counterattack for his 24th club goal of the season.
Undav turned creator, setting up his teammates for a series of chances as Stuttgart took control but Müller's quick reactions kept his team in the contest.
Chris Führich had one shot saved just before the game went to extra time and hit the post soon after. Freiburg were left aggrieved after Lucas Höler had a goal disallowed for bodychecking a defender.
Bayern reached the final for the first time since 2020 by beating Bayer Leverkusen 2-0 on Wednesday.
The cup offers a Europa League place for the winner, but that will now almost certainly revert to being an extra spot in the league standings since Stuttgart are on track to qualify for next season's Champions League through the Bundesliga.