Gordon won for the third time this season and 85th time in his career, breaking a tie with Bobby Allison and Darrell Waltrip for third on the career list.
"I totally forgot about that," said Gordon, who received a special plaque from NASCAR during the victory ceremony in front of the main grandstand. "Eighty-five, wow! That is un-un-believable. With the kind of day we had, the kind of year we're having, I feel rejuvenated."
He definitely earned this win, fending off the defending five-time champion. Johnson put his Chevrolet in front of Gordon's No. 24 car a couple of times but couldn't hold on through the corners. At the end, with both drivers racing as hard as they could on fading tires, their cars came close to getting sideways several times.
Johnson made one last run for the lead on the final lap, but had to back off to keep from putting his car in the wall. Gordon pulled away to win by 0.598 seconds.
"I'm so glad I grew up racing on dirt," Johnson said. "I could have spun out four or five times at the end."
The AdvoCare 500 was only the second Cup race since 1978 to be run on a Tuesday. It was originally scheduled for Sunday night, but rain from the remnants of Tropical Storm Lee forced a two-day postponement.
Gordon, a four-time champion, had already locked up a spot in the Chase for the championship, but this performance stamped him as a prime contender to end Johnson's unprecedented title run.
Then again, Johnson looks pretty strong, too. He moved past Kyle Busch to take the top spot in the season standings, leaving little doubt that he's still the one everyone's chasing.
"The reality is we have a lot to be proud of," said Johnson, who has only one victory this season but always seems to run near the front. "We know we have a very good chance of winning the championship."
Tony Stewart was feeling a lot better about his chances after making up more than 8 seconds on the leaders in the final laps to finish third. He solidified his hold on 10th place -- the final spot in the Chase that will be determined on points -- heading to next weekend's race at Richmond, the last one before the playoff field is set.
"The points are big going into next week, that's for sure," Stewart said. "I'm proud of the effort everybody gave this week. It may come down to one point. Having the strong finish we had here, maybe that will be the difference in making it or not making it next week."
Six drivers had already clinched a spot in the 12-driver playoff, and three more joined them Tuesday. Kurt Busch and Ryan Newman are locked in on points, and Brad Keselowski wrapped up at least a wild card with his sixth-place finish.