Austria carved out a string of fine chances after the break but Marko Arnautovic was thwarted by the legs of the advancing Mert Gunok, before Konrad Laimer and Stefan Posch also passed up inviting openings.
Instead, Demiral remarkably notched his second of the night as the big centre-back met another Guler corner with an unstoppable header to double the lead, just before the hour mark.
It demanded a response from Austria and an enthralling contest was enhanced further when, seven minutes later, ex-Red Marcel Sabitzer swung in a corner that was headed down by Posch for substitute Michael Gregoritsch to find the roof of the net.
Baumgartner was off target with two headers but the biggest drama was saved for the final seconds, After Baris Yilmaz almost made it safe, Baumgartner looked certain to force extra-time when he nodded goalwards. However, Gunok pulled off a miraculous stop to preserve the lead and send his nation through.