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.