MARTINSVILLE, Va. -- Who is Mr. Martinsville now?

Jeff Gordon once appeared to own sole possession of that title, but he ceded it to Hendrick Motorsports teammate Jimmie Johnson several years ago. Gordon took a large step toward reclaiming it Sunday when he earned his first win of the season, and the eighth of his career at Martinsville Speedway, by capturing the Goody's Headache Relief Shot 500 powered by Kroger.

Gordon made what proved to be the winning pass on Matt Kenseth with 21 laps to go and held off the rest of the field for the victory. It moved him into third place in the Chase for the NASCAR Sprint Cup standings, 27 points behind Matt Kenseth and Johnson, who are now tied for first with three races remaining in the season (Kenseth owns the tiebreaker).

"I'm just so proud of my team for never giving up. We've shown it all year long and we've been through a lot. But this is making it all worth it, to get this huge win at Martinsville," Gordon said in Victory Lane. "Man, what a great race car."

Kenseth was attempting to win for the first time in 28 career starts at Martinsville, where he typically has struggled.

"Jeff's experience got me. I just don't have that much experience running up front here," Kenseth said. "I had something that was working, but I was hurting the rear tires and ended up hurting the front tires, too."

Johnson, who also has eight career wins at Martinsville, finished fifth. He said he wasn't surprised Kenseth bucked past history and tightened the Chase points race.

"It's been a great battle with the 20 car (driven by Kenseth) and the 24 team (of Gordon) has shown it wants to be a part of the championship battle as well," said Johnson, who owned a four-point advantage heading into Sunday's race. "It's going to be a fight to the end. It's what I want to see and I know it's what the fans want to see, too. We'll keep digging hard."

Kenseth appeared in command but ended up barely holding off Clint Bowyer to finish second after Gordon made his nifty pass to the inside going into Turn 1 on Lap 479 of the 500-lap event. He and Johnson spent much of the day sparring, trying different strategies as numerous cautions -- a total of 17 for 111 laps in all -- continued to mount on the only short track on the 10-race Chase schedule.

At times, Johnson and Kenseth took turns running up front. Then one would fall back, only to rally again.

Gordon, meanwhile, kept lurking in the vicinity of the Chase leaders. Now he can be called one of them, as he at least injected himself into the championship conversation heading to Texas.

"I think anyone within a race (or 43 points of the lead) is still in it," Kenseth said.

Using that criteria, that would also include Kevin Harvick, who is in fourth and 27 points back; and Kyle Busch, who is in fifth and 36 back heading into next Sunday's race at Texas Motor Speedway.

It appeared heading into Martinsville that Johnson would have a huge advantage over Kenseth at the storied paper clip, where NASCAR races have been held since 1949. While Johnson entered with eight career wins, 16 top-fives and 20 top-10s in 23 career starts at the track, Kenseth had never won and had registered only three top-five and eight top-10 finishes in 27 career starts. To put it in even better perspective, Johnson entered the day having led a total of 2,327 laps in his career at Martinsville; Kenseth had led a total of 169 out of more than 13,000 laps he had run there.

Those numbers meant nothing when it came right down to it Sunday.

Kenseth said that Kasey Kahne, another of Gordon's teammates at Hendrick Motorsports, helped Gordon catch him.

"When the 5 (driven by  Kahne) blocked us in there or whatever, we lost a lot of momentum and Jeff got to me. From that moment on, I had a hard time holding him off," Kenseth said. "All the lapped cars up until that point were so courteous and you could roll right by them."

Regardless, Gordon was stalking Kenseth for several laps and carefully plotting his course of action.

"I was thinking, 'What would Jimmie Johnson do?' Or better yet, 'What would Richard Petty do?' "Gordon said. "The tires really went away on us there at the end. I knew his car was good on the short runs, and he was putting together a really good run. But every time I saw him slip a tire, I just tried to conserve my tires and drive real straight into the corner and off the corner. … I finally started seeing where he was struggling on the exit (from the corners). I dove in there a couple times and couldn't make (the pass).

"Matt really drove a first-class race. I didn't know if we were going to get him. But it was awesome when we finally did."