Gallacher began the day with a two-shot lead over playing partner Rory McIlroy, but bogeyed the first two holes and dropped further shots on the sixth and eighth to fall two off the pace.
However, the 39-year-old Scot found the back nine at Emirates Golf Club very much to his liking for the second day in succession, making birdies on the 11th, 13th, 16th and 17th to finish 16 under par after a closing 72.
It was nothing like as spectacular as the seven birdies and an eagle he produced to cover the same stretch in just 28 shots on Saturday, but was enough to win by one shot from Argentina's Emiliano Grillo.
Grillo had set the clubhouse target on 15 under after a flawless 66 completed in amazing fashion, the world number 268 holing from 65 feet for an eagle on the 18th after his approach had clattered into the hospitality tents behind the green and bounced back onto the putting surface.
France's Romain Wattel and American Brooks Koepka shared third place on 14 under, with McIlroy two shots further back after struggling to a 74.
World number one Tiger Woods carded a final round of 71 to finish in a tie for 41st on six under.