McIlroy shot his best score in more than three years, snatching an eagle and seven birdies in a nine-under-par 63, while Gallacher was also in the thick of the charge with an eagle in his 66.
Tiger Woods, the third member of the group, struggled off the tee but the world No.1 out-putted his partners, taking just 25 putts after finding just seven of the fairways in a 68 that included nine back-nine pars.
McIlroy goes into today's second round leading by two from Italy's Edoardo Molinari (65) with Gallacher and four others sharing third place.
Since defeating the Masters champion Adam Scott at last month's Australian Open in Sydney, McIlroy continues edging closer to the form that earned him two major victories. He was joint runner-up two weeks ago in Abu Dhabi while his 63 is a best since a similar first round in the 2010 UBS Hong Kong Open and just four months after leading with the same score in the Open at St Andrews.
"This round is right up there as my best round since beating 'Scotty' last year in Sydney and the 64 I had at the Deutsche Bank, and it's just the way I controlled my ball and the way I played," said McIlroy. "This is definitely up there in terms of golf courses I'm comfortable on. The Old Course is another one because I feel like I'm at home and I feel like I can shoot good scores there. I wanted to shoot 62 today because I shot 62 in a casual round at the Els Club last week, so I wanted to try to shoot two 62s in one week.
Fred Couples, the former world No.1 and 1992 Masters champion, Couples has no doubts that McIlroy's struggles were but a temporary blip.
"It's not a sprint, it's a marathon," said Couples, who won the Desert Classic in 1995 and carded a two-under-par 70. "I would have told Rory 'Hey, when I was 26 I didn't play well for a year but it did not really slow me down and just keep pushing and playing'.
"When a guy that talented gets his game back he will dominate. It's just a matter of how long and if you can keep away from all the people talking about, you will do just fine."
Woods insisted his game was "just a fraction off" but thought he played "all right".
The 38-year-old revealed he has been working on making a shorter backswing with coach Sean Foley due to the numerous knee operations he has endured over the years.
"I've always played my best from a shorter position," he added. "Looking back at my younger days on tour it as even shorter than it is now, the only difference is I can't wheel on it like I used to. I used to snap the knee at the end to get the power, if I did that now I'd destroy the knee just like I did before. That's one of the reasons why I've had so many operations on it."
A highlight of Gallacher's round was at the 18th, his ninth, where he landed a 177-yard 7-iron second shot to just four feet for eagle.
"It was good day and having played with Tiger on Tuesday I knew what to expect," he said. "You've got to get on with your own game but then Tiger has been brilliant in the last couple of rounds I've played with him, and Rory was just sublime today. It was hard not to draw some inspiration from Rory. He made nine under par look easy."
"It's just good to play with Tiger and Rory. You get the buzz. I wasn't nervous at all today, and I want to be playing with one of them on Sunday, last off."
Paul Lawrie, still struggling with a neck injury, seemed to be heading for an indifferent day when he bogeyed his opening two holes but the Aberdonian buckled down, playing his last 14 holes in four-under for a 68.
"I'm still struggling, sniffin' and coughin', while the neck is still a bit stiff," said Lawrie. "Overall, it was a good day. I played lovely . . . especially after starting like that.
Colin Montgomerie and David Drysdale were the best of the other Scots in the field, with 70s. Chris Doak was one stroke further back.