Steven Naismith had missed three good chances before Brighton striker Mackail-Smith, playing in place of the injured Kenny Miller, headed Phil Bardsley's cross over Peter Jehle in the 32nd minute to ultimately secure three crucial points and make himself a hero to the Tartan Army.
Scotland are now one point above the Czech Republic going into Tuesday's final clash with runaway Group I winners Spain in Alicante.
It will be a tall order for Craig Levein's men to take anything from the World and European champions who are going for a clean sweep of qualifying wins, but if they equal the Czech's result in Lithuania, they will book a play-off spot.
The build-up to the game was dominated by the fitness problems of skipper Darren Fletcher and star striker Miller.
Fletcher was originally ruled out due to a bout of tonsillitis, but flew in late to join the squad.
Conversely, Miller was thought to be in with a chance of overcoming his groin injury but failed a fitness test, giving Mackail-Smith his chance.
The hosts were bottom of the table with four points but Scotland needed a 97th-minute winner to beat them at Hampden in September last year, a point stressed by the Scots' camp beforehand.
The stadium was filled mostly by the typically raucous Tartan Army, making it effectively a home game for the Scots who started well, putting Liechtenstein goalkeeper Jehle under pressure.
In the sixth minute a nudge by home midfielder Rony Hanselmann on Mackail-Smith inside the box drew claims for a penalty, but Norwegian referee Tom Harald-Hagen pointed calmly for a goal kick.
Moments later, Naismith glanced a Fletcher free-kick wide of the target from close range.
However, in the 18th minute the Scots had a scare when Allan McGregor had to fly to his right to tip a powerful drive by Thomas Beck over the bar.
A minute later midfielder Barry Bannan, from wide on the right, lobbed the ball over to the back post and this time Naismith headed weakly straight at Jehle from barely six yards out.
The Rangers player then missed another decent chance when he ran onto his own pass and rounded Jehle, only to hit the side netting from an angle with the goal open.
As the Scots swarmed around the Liechtenstein penalty area again, Bannan curled a left-footed shot from the edge of the box which just missed the far post.
Bardsley was next to have a go on the half-hour mark, forcing Jehle to dive down to his right to push the ball past the post for yet another corner which came to nothing.
However, Jehle was caught in no-man's land when Mackail-Smith headed Bardsley's looping cross over his head from 10 yards out to break the deadlock and ease the anxiety on the Scotland bench and in the stands.
Three minutes from the break Naismith claimed to have been tripped by Martin Stocklasa as he broke into the box, but his pleas fell on deaf ears.
Scotland came out of the traps for the second half showing the same determination which had allowed them to dominate the first 45 minutes.
The second goal, though, was needed to give Levein's men some breathing space and they came close in the 54th minute when Bardsley headed a Charlie Adam corner just over the bar after escaping his marker at the near post.
Five minutes later, the Sunderland defender failed to control a raking Bannan pass after nipping in behind the home defence.
Still the visitors kept pushing and Jehle conceded another corner from Christophe Berra's low drive from the edge of the box, but Liechtenstein defended resolutely.
In the 69th minute, in a rare breakaway and with the Scottish defence stretched, Nicolas Hasler fired in a low drive which had McGregor stretching to his right to prevent the ball from sneaking in at the far post.
James Forrest replaced Bannan three minutes later before Don Cowie came on for Adam, but as the game entered its final stages nerves began to show.
Jehle made good saves from Naismith and Berra in the closing stages but despite some nervous moments, the Scots held on for the win.