Vedad Ibisevic spurned the chance to put Stuttgart in front in the 87th minute when his spot-kick was saved by Diego Benaglio, and less than three minutes later, Dost clinched victory for the Wolves, who managed only three wins on their travels all last season.
Stuttgart will now turn their attention to reaching the group stage of the Europa League as they travel to Moscow on Tuesday.
Wolfsburg made a bright start with the first chance falling their way in the 15th minute when Ashkan Dejagah sent a volley over the crossbar from eight yards out after Sven Ulreich pushed Diego's header out.
The visitors continued to show a lot of attacking intent with Ivica Olic next up to send in a dangerous ball which Ulreich was unable to clear without the help of Serdar Tasci.
The crowd were ripped from their seats in the 23rd minute, but there were no celebrations on the field when Maza's header hit the back of the net as the assistant's flag had already been raised.
Ibisevic, whose two goals put Stuttgart in the driving seat of their Europa League tie with Dynamo Moscow on Wednesday, nearly opened his Bundesliga account for the season in the 34th minute, but he failed to get the better of Benaglio, who raced from his line to meet him.
Wolfsburg's response came from Olic, who headed wide from 10 yards out.
The side went in at the break goalless, although not without the net being rippled again, this time at the other end of the field, although Dost's effort was swiftly ruled out for a push by the Wolfsburg striker.
Stuttgart coach Bruno Labbadia sent Cacau into the fray and the move added fresh impetus to the home team's attack with Artur Boka finding the side-netting with a direct free-kick.
Cacau was denied by Benaglio in the 73rd minute, but the biggest chance to win the game came three minutes from the end when Emanuel Pogatetz fouled Ibisevic inside the penalty area.
The Bosnian stepped up but was denied by Wolfsburg and Switzerland's number one.
It turned out to be a costly miss as the Wolves stole victory in the last minute with Dost heading in Vieirinha's cross to earn the visitors all three points.