The Socceroos were searching for a big win to put pressure on their Group B rivals Saudi Arabia, who started the evening level on points and who host already qualified Japan later.
Saudi Arabia have a superior goal difference to Australia, meaning victory in Jeddah would hand them the second automatic World Cup spot and consign the Socceroos to the play-offs.
It wasn’t until the 69th minute that Tomi Juric got the opener, and the Thais — who earlier had a strong penalty appeal turned down — hit back through Pokklaw Anan before Mathew Leckie’s late winner.
“We got at them, it was a little bit disappointing their goal on the counter, but overall we got ourselves in good scoring positions,” Australia skipper Mark Milligan said.
“I don’t know how many times we hit the post, we gave it everything we had tonight. Credit to Thailand, they hung firm on their 18-yard box for a long time.”
The Asian champions peppered the Thai goal from the outset, with Hertha Berlin’s Leckie featuring heavily on the right wing.
Aaron Mooy and veteran talisman Tim Cahill both hit the post, and Tom Rogic’s long-range volley was saved by goalkeeper Sinthaweechai Hathairattanakool.
Juric wasted a direct free kick, blasting high over the bar, and also had a great goal-bound chance blocked by Adisorn Promrak.
Thailand’s best moments came through their skipper Teerasil Dangda, and Australia goalkeeper Mat Ryan was fortunate to escape punishment for bringing down the forward wide of the goal area.
The Socceroos had 15 shots to Thailand’s three in the opening half, with two on target and four blocked.
Thailand looked unlucky not to be awarded a penalty when Teerasil, on a breakaway, was brought down inside the box by defender Trent Sainsbury.
Juric finally got the home side in front with his glancing header off a Mooy cross.
Thailand, who had only two points from their previous nine group games, rocked the Australians with an equaliser through Pokkhao Anan in the 82nd minute.
But Leckie grabbed the winner for the Socceroos four minutes from the end to put the pressure back on the Saudis to beat Japan in their final game.
Download our app and read this and other great stories on the move. Available for Android and iOS.