That scenario had appeared wholly unlikely for much of a nerve-shredding final day in Dubai, as Gallacher imploded with four bogeys on the front nine to fritter away the two-shot overnight lead he had held over Rory McIlroy.
But the Scot, who came home in 28 shots on the third day, again showed his liking for the back nine at Emirates GC with a quartet of birdies to finish on 16 under par and earn a one shot victory over Emiliano Grillo.
Earlier in the day, the Argentine had set up a grandstand finish "“ quite literally "“ when his approach to the last hole hit the hospitality stand over the back of the green, and ricocheted onto the putting surface.
Grillo made the most of his fortune by draining the eagle putt from 40 feet to set the clubhouse target on 15 under par, but Gallacher held his nerve with a par at the last to sign for a level par round of 72 and claim his second successive victory in the US$2.5 million event.
The win rocketed Gallacher to seventh place in The Race to Dubai and into the top 40 of the Official Golf World Ranking, gaining the 39 year old a place in the Masters Tournament for the first time.
He said: "It took everything I have, to be honest. It's just been an unbelievable this week, and what a way to end it. I was quite fortunate that no one was running away with it today. Even though I didn't play my best on the front nine I hung in there, and in the end it worked out lovely.
"I've never been treated so well, starting with the Champions Challenge on Tuesday and then playing with Tiger and Rory on the first two days. It's such a great tournament, definitely one of my favourites, and to win it on the 25th anniversary is special."
Grillo's cheque for Ã¢Â‚Â¬202,176 was comfortably the biggest of his burgeoning European Tour career, and moved the Argentine an astonishing 102 places up The Race to Dubai to 17th.
He said: "That second shot on the 18th went a little bit left and a little bit further than I wanted, but I got lucky with the bounce and then a bit lucky again with the big putt.
"I'm quite happy with what I've done, and it was a good run overall. I left some putts out there, but the one on the 18th definitely made up for them. So I'm very happy."
Third place was shared between American Brooks Koepka and Frenchman Romain Wattel, who signed for respective rounds of 70 and 66 to finish on 14 under par.
McIlroy was undone with three bogeys in four holes after the turn, as the Northern Irishman closed with a round of 74 to fall back into a share of ninth place on 12 under par.
World Number One Tiger Woods rattled off a trio of closing birdies to finish in a tie for 41st place on five under par.
The leading Australian was Brett Rumford whose final round of 67 moved him up 16 places to finish in a share of 13th. Scott Hend, who briefly led the event during round two, eventually finished 29th
Leading Final scores:
272 S Gallacher (Sco) 66 71 63 72,
273 E Grillo (Arg) 71 67 69 66,
274 R Wattel (Fra) 68 73 67 66, B Koepka (USA) 69 65 70 70,
275 R Rock (Eng) 67 70 68 70, S Webster (Eng) 71 70 64 70, T Olesen (Den) 71 68 65 71, M Ilonen (Fin) 69 72 70 64,
276 R McIlroy (Nir) 63 70 69 74, E Molinari (Ita) 65 72 68 71, P Casey (Eng) 70 72 67 67, B Wiesberger (Aut) 70 70 68 68,
277 F Molinari (Ita) 69 69 71 68, D Willett (Eng) 71 65 73 68, B Rumford (Aus) 69 70 71 67, S Hansen (Den) 67 71 71 68, P Waring (Eng) 70 70 68 69, T BjÃƒÂ¶rn (Den) 72 70 68 67, D Fichardt (RSA) 69 72 66 70,
278 S Dyson (Eng) 69 69 73 67, J Donaldson (Wal) 69 68 70 71, D McGrane (Irl) 66 70 71 71,
279 J Campillo (Esp) 68 72 70 69, R Kakko (Fin) 69 69 68 73, M Madsen (Den) 71 67 72 69, A Wall (Eng) 74 66 69 70, C Wood (Eng) 73 69 70 67, J Luiten (Ned) 70 69 70 70,