Clayton Donaldson's goal in first-half injury time gave City the lead as he slotted home after Michael Morrison had charged down a Tom Lees clearance.
But Hooper smashed home the equaliser off the crossbar following neat play between Atdhe Nuhiu and Barry Bannan.
The striker got the winner soon after as he finished from close range from Fernando Forestieri's pass.
Media playback is not supported on this device
The win, which saw Wednesday move back into the Championship play-off places, came at a big cost to Carlos Carvalhal's side as they lost three players to injury.
Kieron Lee was hurt in the warm-up and replaced by Vincent Sasso before Keiren Westwood and Sam Hutchinson clashed with one another as the Wednesday defence blocked an eighth-minute City attack.
Westwood was stretchered off after receiving lengthy treatment on the pitch with a suspected concussion, while Hutchinson's knee injury meant he could not continue despite staying on for a few minutes after play was eventually restarted.
Birmingham manager Gary Rowett:
"To go in 1-0 up at half time I was really pleased but felt we should have done a little more to stop the game becoming too open at times.
"When you have the attacking players Sheffield possess you know they only need one chance.
"In the second half we had another great chance when Donaldson missed from close range."
Sheffield Wednesday coach Lee Bullen:
"Hooper's first goal was fantastic. Some of the one-touch play on a difficult pitch was sublime.
"To go and get the second goal a few minutes later made us ecstatic.
"We were hindered losing two players so early in the game but we have a very good squad."
Gary Hooper scored twice in two minutes as Sheffield Wednesday came from a goal down to win at Birmingham City.