Hamlin crossed the finish line nearly 2 seconds ahead of pole sitter Jamie McMurray to grab his third win in the last six Sprint Cup races. He also won Friday's Nationwide Series race at Darlington, giving him a weekend sweep.
Gordon fell back to the last car on the lead lap after he was blocked by Tony Stewart and missed the entrance to make his final pit stop.
Burton passed Hamlin with 26 laps left, but during a caution, Hamlin took only two tires on the final pit stop and exited first while Burton had to serve a pass-through penalty after running over his air hose.
Kurt Busch ended in third place. Gordon bounced back in the final laps to claim fourth.
Juan Pablo Montoya came in fifth.