Austria, tipped as tournament dark horses, dominated the opening period but Szalai fired Hungary ahead on 62 minutes with Stieber wrapping up a shock victory over their old rivals late on in the 138th meeting between the sides.
Aleksandar Dragovic was sent off for Austria shortly after Szalai ended an 18-month goal drought as Hungary made a triumphant return to a major tournament having last featured at the 1986 World Cup.
“The players played out of their skins,” said Hungary coach Bernd Storck, who had previously described just qualifying for the tournament as a ‘miracle’.
“This game today against such a difficult team, we had to play some very good football. We had a bit of luck, but you need a bit of luck in football.”
Austria coach Marcel Koller bemoaned a disappointing performance which cranks up the pressure on his side ahead of Saturday’s game against Portugal in Paris.
“Unfortunately we weren’t able to do what we wanted today,” he said.
“Maybe some players were nervous because it was the beginning. We can’t just push a button and say ‘Now I’m going to play at my best level’.
“The situation now is we’ll have to try and win against Portugal.”
Hungary goalkeeper Gabor Kiraly kept a clean sheet as he became the first 40-year-old to feature at the European Championship, surpassing Germany’s Lothar Matthaus as the oldest player in tournament history.
Austria captain Christian Fuchs and winger Martin Harnik were the only two survivors from the country’s debut campaign eight years ago named in Koller’s starting line-up.
However, they were inches away from the perfect start when Bayern Munich star David Alaba went agonisingly close to justifying his billing as one of the potential stars of the tournament when his dipping left-footed strike from outside the area crashed against the post.
The versatile Alaba, operating in his customary central midfield role with Austria, soon fired another warning to Hungary with a first-time strike at Kiraly after a threaded pass through from Marko Arnautovic.
Szalai miscued a header from a Balazs Dzsudzsak free-kick in a rare opening for Hungary, while Kiraly showed his reflexes remain sharp despite his advancing years to claw behind a low strike from Zlatko Junuzovic.
Arnautovic then slid a dangerous low ball across the face of goal as Austria continued to threaten, but Harnik lost his footing as he tried to slide home at the far post.
Hungary captain Dzsudzsak wasted arguably the best chance of the opening 45 minutes, though, as he screwed his shot wide of goal after he was picked out by Laszlo Kleinheisler on the right-hand side of the penalty area.