Keselowski finished third in a Team Penske Ford, and said after watching a replay he knew he had no chance to win once drivers behind him committed to their moves and Hamlin came charging alongside him.
"I don't feel like there's anything I could have done differently," Keselowski said.
But as a driver who got his break when Earnhardt hired him to drive for JR Motorsports in the Nationwide Series, Keselowski was able to deal with his disappointment.
"If there's ever a guy who is due, it's the guy who finished second three out of the last four years. He was due," Keselowski said. "So I'm happy for him and happy for all those guys. He's probably my best friend in the garage outside of my teammate."
Hendrick took fourth and fifth with Gordon and last year's race winner, Jimmie Johnson, in what quickly became a company-wide celebration.
"He's been knocking on the door of the 500 for a lot of years. He got it done tonight -- did an awesome job," said Johnson, who beat Earnhardt to the finish line a year ago.
The win means Hendrick already has one of his four drivers in the Chase for the Sprint Cup championship. Under the new win-and-get-in format announced last month, Earnhardt is now eligible to race for the title and can spend the next 25 races preparing for the postseason.
"We might be in the Chase -- I ain't going to worry about that," Earnhardt said from Victory Lane. "Trust me, man, we're going to have a blast this year."
Rain wreaked havoc on the event for the third time in six years, and this year's race was stopped after 38 laps as a strong storm blew into the area.
The National Weather Service issued a tornado warning in the area and advised people to take shelter, and fans fled from the grandstands.
NASCAR rolled out the track drying system Air Titan for several failed attempts over the delay. It was the only on-track activity for more than six hours, but there was plenty of behind-the-scenes fun as drivers desperately tried to stay entertained.
It hit absurd levels as Fox Sports tried to fill the air time with a replay of the 2013 race that hundreds of thousands did not understand wasn't a live broadcast. Social media exploded with congratulatory tweets for last year's winner, Johnson, who posted on his account: "I hear I won the #Daytona500? Haha! I also have friends confused and texting congratulations to me."
Fellow drivers had fun with the widespread error, too.
"Wait a minute! I'm confused, did @JimmieJohnson win or not?" Bowyer tweeted.
Plenty of fans on Twitter were confused throughout the replay, tweeting along as if the race was live. Deadspin ran some of them under the headline, "Scores Of Idiots Don't Realize Fox Is Airing Last Year's Daytona 500."
Even NASCAR couldn't resist jokingly weighing in on the confusion.
"Congrats @JimmieJohnson amazing," tweeted Steve O'Donnell, NASCAR's senior vice president of racing operations.
Piling onto the strange story line, Fox's rain-delayed coverage was sponsored by the movie "Noah," which opens March 28 and stars Russell Crowe as the title character who builds an arc to save creation from a massive flood.
When the cars finally got back on track, Earnhardt took off. He had some challenges, particularly from the Roush Fenway Racing duo of Greg Biffle and Carl Edwards, but he managed to break free every time it mattered.
The Associated Press contributed to this report.