Gallacher used a 16th-hole eagle to lock up the championship in winning the Dubai Desert Classic last year but needed an even stronger finish this time around before edging Emiliano Grillo for his third European Tour title. He is the first person to win the tournament in consecutive years.
Grillo had a 72nd-hole eagle to move into the lead before Gallacher posted birdies at Nos. 16 and 17 and turned in an even-par 72 for the final round. That left him at 16-under-par 272 for the tournament.
The last eagle gave Grillo a 66 Sunday and he wound up second at 15-under. Romain Wattel, with a final round 66, and Brooks Koepka, who shot 70 Sunday, tied for third at 14-under.
Rory McIlroy, with four bogeys and two birdies, shot 74 Sunday and slipped from second place after three rounds to a tie for ninth at 12-under. World No. 1-ranked Tiger Woods, with a final-round 71, tied for 41st at 6-under.
Gallacher started the round with a two-stroke lead over McIlroy after going 10-under over the final 10 holes Saturday. But he staggered early Sunday, with bogeys on the first two holes and two more at Nos. 6 and 8.
He dropped a 25-foot putt at the par-3 11th for his first birdie of the day and added another at the 13th. Grillo drained a 40-foot eagle putt at 18 -- after his second shot bounced off a hospitality tent and onto the green -- but Gallacher made an 8-footer for a birdie at 16 and took the final lead with a 17th-hole birdie.