Gay made six birdies on the front nine, including five in a row from the fourth through ninth holes to help him to a 66 and, at 9-under par, a one-stroke lead over former British Open champion Hamilton.
First-round leader Alex Cejka followed his 64 with an even-par 71 and was tied at 7-under with two-time U.S. Open champion Lee Janzen.
Janzens round of 70 featured an ace on the 17th hole.
Gay has steadily improved over his 11 full PGA Tour seasons. His best came last year with his first career victory at the Mayakoba Golf Classic and a personal high of more than $2.2 million in earnings.
That front nine was awesome, Gay said.
Gays streak began when he rolled in an 18-footer for birdie on the par-3 4th hole, then picked up steam with a 25-foot putt a hole later. His approach from a fairway bunker landed inside 5 feet for a third straight birdie.
After a birdie putt inside 10 feet on the seventh, Gay closed the stretch with another sizeable putt of 20 feet to get reach 10 under.
Gay had a chance from 15 feet away on the ninth hole to keep things going, but settled for par.
He was well shy of the PGA Tour mark of eight straight birdies, accomplished many times. Last year, champion Boo Weekley and Jay Williamson each had streaks of five consecutive birdies at Harbour Town.
Gay made his only bogey on the 10th hole, then parred in to hold on to the lead.
Hes had his struggles here, missing the cut six times in his nine previous trips. And Gay felt as challenged Friday with the swirling winds, despite his charge.
Heck, I was as surprised as anybody about his birdie run, he said.
Gay led a strong, if not stellar field, as many of the worlds best players took the week off to recuperate after the Masters.
Green jacket winner Angel Cabrera took a break as did Tiger Woods and Phil Mickelson. In all, just six of the top 20 ranked golfers teed it up here.
Hamilton, who tied for 15th at Augusta, may have found his major championship at the right time.
His five-year PGA Tour exemption from that 2004 win ends after this season. And Hamilton had done little in the years first three months ' seven missed cuts in nine events ' to guarantee him a spot beyond December.
Getting off to a slow start, I think thats when I started thinking, Man, you better start doing something and not waste your opportunity. Youve got one year of a free pass left, you better start getting after it.
Hamilton went after it hard last week to earn his biggest prize ($131,250) since 2004. The bounce back continued at Sea Pines Resort. He posted two sub-70 rounds in a tournament for the first time all season.
Hamilton got going with three birdies over four holes of his starting nine. He put a pitching wedge about 3 feet away on the 13th for the first birdie, knocked in a 12-footer on the par-3 14th and then added an 8-foot birdie putt on the 16th hole.
Hamilton closed with a birdie for the second straight day, rolling in a 10-foot putt on the ninth.
Theres no mystery about Hamiltons improved play. He said he has worked hard on his iron, wedge and bunker play, some things I havent been doing well over the last four years.
Janzen, whose last tour win was that 1998 U.S. Open win over the late Payne Stewart, continued his own try at shoring up his shaky playing status. Janzens finished outside the top 125 the past four years and missed the cut in four of his seven events this year.
The highlight was the hole in one on the breezy 17th that moved him to a shot off the lead. Janzens 8-iron tee shot took three hops, rolled against the pin and dropped in.
It was just drawing a little bit, bounced right towards the hole and when somebody said, Go in, I was just waiting for the reaction up on the green, Janzen said.
Two-time defending champ Weekley nearly shot himself out of the tournament early on. He made three bogeys and a double bogey when he four-putted the simple par-4 9th from 14 feet away.
However, Weekley rebounded with three birdies coming in to finish 1-under, eight shots back.
You never know what can happen on the weekend, he said.
Missing the cut were Steve Flesch and Jim Furyk, the two highest Masters finishers competing at Harbour Town. Flesch tied for sixth at Augusta, but was 5-over here. Furyk, who tied for 12th last week, was 3-over. Along with Janzen, Tommy Armour III also aced a hole in the second round. He hit an 8-iron 162 yards into the cup on the 7th. Jerry Kelly withdrew with illness after carding a 10 on the par-5 15th hole.