But whether Leckie's goal - coming after Tomi Juric's opener and Pokklaw Anan's stunning reply - is enough to send the Socceroos to Russia next year remains to be seen.
Australia must sweat on the result in the Saudi Arabia-Japan match on Wednesday morning (AEST), where any win for the home side in Jeddah will send the Green Falcons to the 2018 tournament.
But there was no lack of enterprise on display at AAMI Park, where the Socceroos achieved the result they wanted, but not the scoreline.
On a numbingly cold Melbourne night, Australia laid siege to the Thailand goal.
Ange Postecoglou's side racked up an astonishing 45 shots.
Both Mooy and Tim Cahill, returned to the starting line-up among six changes by Postecoglou, rattled the goalposts in the opening quarter-hour.
What appeared to be a rout in the making quickly turned into a frustrating night for the Socceroos.
Time after time, Australia went forward, only to be thwarted by the Thai rearguard.
Goalkeeper Sinthaweechai Hathairattanakool made a string of superb saves, none better than a close-range effort to deny Juric's first-half volley.
The striker finally broke through on 69 minutes, heading home Aaron Mooy's pinpoint cross and sparking a mad scramble to run up the scoreline.
Instead, it was Thailand who stunned Australia on the counter, with Pokklaw thrashing home off the crossbar with eight minutes remaining.
Leckie saved Australia's blushes.
The right-winger jumped on a loose ball and threaded it through a congested box to ensure a Socceroos win.
And now, they wait, to learn if they will be going to Russia - or headed for a dreaded two-leg home-and-away qualifying route through Asia and North or Central America.