The Scot, who started the day on seven under par, was finding the going tough in the early stages of day three when he played his first eight holes in one over par to lie seven shots off the lead. However, he then blitzed his next 10 holes in 10 under par, following a birdie on the ninth with seven more and an eagle in a brilliant back nine of 28, to sign for a round of 63 and finish on 16 under par, two shots clear of Rory McIlroy.
By coming home in nine-under-par 28, Gallacher equalled the lowest score to par set first by Spaniard José Maria Cañizares in the 1978 Swiss Open, and later matched by Swede Joakim Haeggman in the 1997 Alfred Dunhill Cup and England's Simon Khan at the 2004 Celtic Manor Wales Open.
Gallacher will have the chance to create yet more history on today's final day, when he will bid to become the first player to win two successive Omega Dubai Desert Classic titles.
He said: "I don't know where to start. I struggled at the start to be honest. I was a bit ropey for the first three or four holes. Then I hit a good shot into the seventh, but missed the putt. I bogeyed eight, and was feeling out of sorts, but then I hit a beautiful drive and 7-iron to about three feet on the ninth, and from then on, I never missed a shot.
"I was just trying to make as many birdies as I could and get a lead because I found the last time it's easier when you are leading than chasing. There's a lot of golf to go, but I will certainly be giving it my best shot."
The 39-year-old from Linlithgow, who was denied a second win of 2013 in a three-man play-off for the Johnnie Walker Champion-ship at Gleneagles, won by three shots here 12 months ago thanks to more amazing scoring.
A first round of 63 was followed by rounds of 70, 62 and 71, during which he made a total of five eagles, the last coming when he holed a wedge from 110 yards on the 16th in the final round.
He was also 10th in 2011 and second in 2012 and will not be overawed by playing in the final group with McIlroy, having partnered the two-time Major winner and Tiger Woods in the first two rounds.
McIlroy admitted he expected to win the title for a second time after holding a one-shot lead at halfway, but despite carding a 69, the 24-year-old was far from the brilliant form which saw him shoot an opening 63.
"It was OK," said McIlroy, who said he was not quite 100% after a bout of food poisoning. "I bogeyed the first again but birdied two and eagled three which was great. I didn't drive the ball particularly well, and I felt like I hit a lot of good putts that just didn't go in. I felt like I left a few out there, but it was a tricky day and shooting anything under 70 wasn't a bad score. Obviously Stephen had a phenomenal round, 63 today is a really impressive effort."
Told Gallacher was 10 under for the last 10 holes, McIlroy added: "I didn't know that. That's a great stretch of holes and hopefully he doesn't continue it tomorrow. I played with him the first two days and he played very well.
"Obviously he was on fire today, but I just need to hit a few more fairways, focus on a few things in my game, not really focus on what he's doing and make a few putts and see where it puts me. It's the second week in a row for me going into the last day with a chance to win, it's a great position to be in."
American Brooks Koepka held the lead midway through the back nine until Gallacher's charge, the 23-year-old dropping shots at the 14th and 15th to card a 70 and finish 12 under alongside Denmark's Thorbjorn Olesen, who fired a flawless 65.
Woods will require a miraculous final round if he is to prevail for a third time after the world No 1 signed for a round of 72 which left him in a tie for 37th place on five under par.