Gallacher holed his approach to the par-four 16th in the final round for his fifth eagle of the week to shake off the persistent challenge of South African Richard Sterne.
"I'm obviously delighted," said Gallacher after carding one-under-par 71 in the final round.
"It's taken a long time but it's sweeter now," added the Scot, whose only previous European Tour title in 404 starts came in 2004 at St Andrews.
Chile's Felipe Aguilar and Dane Thorbjorn Olesen tied for third place and England's Lee Westwood was joint fourth with Australian Marcus Fraser after hitting his second shot into the water on the par-five final hole.
Gallacher, 38, had gone into the closing round three shots ahead but Sterne wiped out his advantage within two holes.
The pair swapped the lead until Gallacher holed a 110-yard wedge to the 16th and finished off with a total of 266, 22 under par.
"I've holed four shots this week but you've got to do that these days to win - you need that little bit of magic," he said.
Gallacher, nephew of former Ryder Cup captain Bernard, looks set to climb into the top 60 of the world rankings ahead of the WGC-Accenture Match Play championship in Arizona in a fortnight and has a good chance of getting into the top 50 in time for a Masters Tournament debut at Augusta National in April.
"It's the only major I've never played," he said. "I sit and watch it in the house with the kids every year and obviously it would be a dream to play there."
- Sports & Recreation