The four-time NASCAR champion tied the late Dale Earnhardt for sixth place on the career victory list with 76, winning for the first time since last July.
After ending the 26-race victory drought, Gordon stopped to pick up a flag bearing Earnhardt's famed No. 3 and black, red and white color scheme for his slow victory lap around the mile oval.
"It means the world," Gordon said. "Holding that 3 flag, it's certainly by no means saying we're as good as him. I learned so much from him. We wanted to honor him. We've been holding onto that flag for a long time."
One of the first drivers to congratulate Gordon in victory circle was Dale Earnhardt Jr.
Gordon started from the pole and led early, but he spent most of the 312-lap race following Tony Stewart, who appeared to be on the way to an easy victory.
As the leaders began a series of green-flag pit stops late in the race, Gordon drove onto pit road at the end of lap 283. As he moved slowly toward his place at the end of pit road, a three-car crash brought out the yellow flag.
The timing was perfect for Gordon, who was able to finish his pit stop and head back toward the track before leader Stewart came back to the finish line, thereby keeping Gordon on the lead lap.
When all the other leaders pitted under the caution, Gordon stayed on track and took the lead.
Once the green flag came back out on lap 294, Stewart tried desperately to regain the top spot. As Gordon struggled to get by Martin Truex Jr., who had pitted before the yellow and was on the end of the lead lap, Stewart saw his chance.
On lap 299, Stewart squeezed his Chevrolet between Gordon and Truex and somehow drove to the lead. But Gordon wouldn't quit, staying on Stewart's rear bumper and then driving under him to regain the lead for good on lap 300.
Gordon pulled away to finish about six car lengths ahead at the finish, earning his first win at Phoenix. That leaves only Homestead and Texas as active tracks where Gordon hasn't won.
"We didn't lead a ton, but we had a good car," said Gordon, who led 53 laps in the No. 24 Chevrolet. "It all did fall in our lap."
"I almost drove through the pit. (Crew chief) Steve (Letarte) made the call (to stop) and I love him. He's as sharp as can be. He's so cool under pressure." Stewart led a race-high 132 laps.
Denny Hamlin may have had the best car on the track Saturday. He led 70 laps and was still out ahead when he was caught speeding entering pit road on lap 99. Hamlin was penalized to the back of the longest line (30th) for the restart on lap 104.
That didn't slow him down much. Hamlin, Stewart's Joe Gibbs Racing teammate, charged back into contention and finished third.
It was the third race for NASCAR's new Car of Tomorrow and its first test on a track longer than a half mile. Hamlin wasn't impressed with the bigger, bulkier car. "If that was the point of it, to make it more competitive for everyone, the mission failed, in my opinion," Hamlin said. "I don't know how we're going to run these cars on bigger tracks without further changes." Reigning Nextel Cup champion Jimmie Johnson, Gordon's Hendrick Motorsports teammate, finished fourth, followed by Matt Kenseth, Jeff Green and Kyle Busch, in another Hendrick Chevrolet.
Kevin Harvick, who won both Cup races in Phoenix last year, led some laps early and wound up 10th.