Austria hit the woodwork three times in London, but goals from Lina Magull and Alexandra Popp sent the Germans through to meet France or the Netherlands in the semi-finals.
Germany had cruised through what appeared to be the toughest group with convincing victories over Denmark, Spain and Finland to reach the last eight in style.
But they were made to sweat until Popp’s bizarre 90th minute goal, when she charged down Manuela Zinsberger’s clearance, gave Martina Voss-Tecklenburg’s side breathing space.
Austria had proven they are awkward opponents by pushing England all the way in a 1-0 defeat on the opening night of the tournament and eliminating Norway in the group stages.
Irene Fuhrmann’s side started strongly as Julia Hickelsberger-Fuller fired too close to Merle Frohms before Marina Georgieva headed off the post from a corner.
Germany were struggling to find the attacking verve that saw them score nine goals without reply in the group stage.
But they pounced on one error from the Austrian defence as Klara Buhl sped down the left wing and her cross was calmly slotted into the far corner by Magull for her second goal of the tournament.
Austria needed Arsenal goalkeeper Zinsberger to keep them in the game before the break as she bravely blocked Svenja Huth’s powerful effort from a narrow angle.
Five years ago, Austria upset the odds to reach the semi-finals in their only previous major tournament at Euro 2017.
And they could have matched that achievement with more luck in the second half.
Barbara Dunst was inches away from catching Frohms off her line with an audacious effort from long range that came back off the crossbar.
Sarah Puntigam then smashed off the inside of the post as Germany struggled to clear a corner.
But Germany quickly regained their composure and should have extended their lead long before Popp’s fourth goal of the tournament.
Giulia Gwinn curled an effort of the post before Buhl’s piledriver crashed back off the crossbar.
Buhl was then guilty of one of the misses of the tournament when she skewed wide from Popp’s unselfish pass.
The Bayern Munich winger was mocked by her own teammates when a replay of that miss was shown on the big screens.
But Buhl was soon able to breathe easy when Popp’s press caught Zinsberger out as her clearance rebounded off the Wolfsburg striker into the net.