DUBAI, United Arab Emirates --
Gallacher fought back after four bogeys left him in a five-way tie for the lead after 11 holes.
He won the 25-year-old tournament with a 16-under 272 for only his third victory in 18 years and 431 events on the European Tour.
Grillo secured his best Tour finish with a 15-under 273 when he eagled the last hole for a round of 66.
Frenchman Romain Wattel also shot a 66, including birdies on the last two holes, to finish tied in third on 14-under 274 with Brooks Koepka (70) of the United States.
The 39-year old Gallacher eventually broke clear of the logjam atop the leaderboard to birdie Nos. 13, 16th and 17th before a regulation par at the last.
“It took everything I had to win today especially after the start I had when I bogeyed the first two holes,” Gallacher said. “The good thing is that I was fortunate that no one was running away with the tournament.
"The turning point came at 11 when I holed a nice putt for birdie."
The win puts Gallacher into the top 40 in the world, putting him in strong position to play the
McIlroy began the last day two shots behind playing partner Gallacher but was 2-over after 10 holes before the first birdie of his round at the 11th.
The Northern Irishman then bogeyed the 12th and 13th before only his second birdie of the round at No. 17.
“On the rare occasions I got the ball close, I didn't make any putts, so it was one of those days,” McIlroy said. “I thought if I could get to 16 under it would be good enough and it turned out that it was as that's what Stephen got to. I just wasn't able to play well enough to get there. It was just one of those days. Anything that could go wrong, did.”