Marco Reus put Germany ahead just before half-time and Mesut Ozil added a second shortly after the interval from the penalty spot. Zlatko Junuzovic pulled a goal back for the hosts in the 57th minute and they were unfortunate not to get at least an equaliser as they caused Joachim Low's side numerous problems but failed to find another goal.
Austria showed no fear in the early exchanges and were unfortunate not to take the lead on several occasions. Their first chance came in the fourth minute when Stuttgart forward Martin Harnik was put through on goal, but his shot took a deflection off the foot of Holger Badstuber and looped over the goal.
Harnik was a constant thorn in the side of the Germany defence and he sent shots either side of the goal as the home side started the stronger in Vienna. Andreas Ivanschitz, who also plies his trade in Germany with Mainz, went even closer with a shot that beat Manuel Neuer in the Germany goal but just missed the target.
Germany then broke in the 44th minute to open the scoring against the run of play. Miroslav Klose played the ball into the path of Reus, who came in from the left and shot low into the bottom left-hand corner with Austria goalkeeper Robert Almer getting a hand to the ball but failing to keep it out.
Germany doubled their lead early in the second half when Thomas Muller was fouled inside the penalty area by Veli Kavlak and Ozil scored from the spot.
Austria were having none of it, though, and they pulled a goal back in the 57th minute, with Marko Arnautovic setting up his Werder Bremen team-mate Junuzovic to give the home team hope. And Austria continued to attack to the very end, pegging Germany back inside their own half but not taking their chances.
Emanuel Pogatetz saw a header cleared off the line by Philipp Lahm before Arnautovic missed the best chance late on, somehow shooting wide when it seemed easier to score as Germany rode their luck but emerged with all three points.