It was the 11th victory of Peters' career and third at Talladega, the most wins at the Alabama track among Truck Series drivers.
"If I kept my head on straight, I knew I had a chance to win," said Peters, who at 38 years old has been relegated to a partial schedule.
"I wish my phone would ring a little more frequently," said Peters, who thanked GMS Racing for the three-race deal that put him back into victory lane for the first time since 2015.
Peters didn't lead until the final lap of the crash-packed playoff race. He had to force Gragson out of his way to get to the front.
"My spotter said clear, and I just wasn't clear enough," Peters said of his move on Gragson. "We are going down to the checkered flag, Noah is going for it, too. Was it a block? I don't know. At that point it didn't matter."
Chris Fontaine was running second when he triggered a 10-truck accident with 36 laps remaining. That set up a red flag stoppage of nearly 12 minutes and more wrecks throughout the field.
Todd Gilliland was second when he tried to pass leader Grant Enfinger with 12 laps remaining, and contact between the trucks caused Gilliland to spin hard into the inside wall. Six laps later, Enfinger was knocked from the lead by Gilliland's father, David, who was in second. The contact caused damage to David Gilliland's truck and Gragson was able to take over the lead -- until Peters moved him for the win.
Myatt Snider finished a career-best second behind Peters, and David Gilliland was third. Haley finished fourth and was followed by Wendell Chavous, who was listed as the race winner erroneously for almost 10 minutes on NASCAR's official website. Chavous said earlier this week that Saturday would be the final NASCAR race of his career.
Friesen finished sixth, which wasn't enough to keep him in the playoff field.