O'Connor sidefooted home from eight yards following Nikola Zigic's lay-off as Blues fought back from 2-1 down in a game played in blistering heat that saw both the Serbian striker and goalkeeper Ben Foster make their first appearances for the Midlands club.
Hong Kong wasted a couple of early chances as Jean Kilama sent a header over the bar from a corner and Christian Annan was woefully off target after springing the offside trap to latch onto Leonardo's ball over the to.
But Birmingham took the lead in the 20th minute after Stephen Carr won a free-kick on the right and, from Sebastian Larsson's delivery, Scott Dann outjumped his marker to steer a header into the far corner.
Hong Kong equalised four minutes later as a poor clearance fell straight to Leonardo and the striker lashed home from inside the box before Annan made up for his earlier profligacy on the stroke of half-time.
The forward brought down a long diagonal ball and with the Birmingham defence backing off, curled a shot into the far corner from the edge of the box beyond a stationary Foster.
Birmingham made a raft of changes at the break and Cameron Jerome poked over from close range within seconds of the restart. Chu Siu Kei then tested substitute Maik Taylor with a free-kick before Kilama almost sliced a cross into his own net with just over 20 minutes to go.
Birmingham levelled in the 73rd minute when Jordan Mutch floated a delightful cross to the back post and Craig Gardner nodded into the opposite corner before O'Connor struck the decisive blow two minutes from the end.