Allmendinger powered past Gibbs and into the lead on a restart with four of 82 laps remaining but Gibbs didn’t go away.
With two laps to go, Gibbs – the 18-year-old grandson of NASCAR Hall of Famer Joe Gibbs – went to the inside of Allmendinger to reclaim the lead for the final time.
Gibbs cruised from there, taking the checkered flag by 0.948 seconds ahead of Allmendinger for his third NASCAR Xfinity Series win in just 10 career starts.
“The 22 (Austin Cindric) and A.J. (Allmendinger) they are like the baddest dudes on the road course ever and I don’t really know how I beat them,” Gibbs said. “My guys have worked so hard and did such a great job and we had a super really good – just a great race.
“I’m just at a loss for words right now. I’m tired. This is just awesome.”
Allmendinger said he knew his lead wasn’t secure on the final restart.
“I needed (Gibbs) to lose about three more spots. If that would have happened, he got in deep and he was carrying all the speed and I just throttled up on the outside to clear him,” Allmendinger said.
“But I knew how good he was, especially through the carousel and the last couple of corners. Fantastic job by him.”
Austin Cindric finished third, Justin Allgaier was fourth and Harrison Burton rounded out the top-five.
Completing the top-10 were Brandon Jones, Noah Gragson, Jeb Burton, Justin Haley and Sam Mayer.
Following the break between Stages 2 and 3, most lead-lap cars pit and Gibbs lead the way when the race returned to green on Lap 44.
On Lap 49, Matt Mills drove straight off the course and slammed into the tire barrier near the inner loop to bring out a caution.
Most of the lead-lap cars pit with Allgaier the first off pit road. Daniel Hemric remained on the track and inherited the lead on the restart on Lap 51.
Hemric pit on Lap 56 which turned the lead back over to Gibbs. He was followed by Jones, Allgaier and Cindric.
With 20 laps to go in the race, Gibbs held a 2.4-second lead over Jones as Cindric ran third and Allmendinger fourth.
On Lap 66, Jones and Allgaier both hit pit road for their final stops for fuel and tires which allowed Cindric to move up to second, 4 seconds behind leader Gibbs.
Erik Jones wrecked on Lap 68 after he said he “lost brakes” in Turn 6 and ended up trapped in the gravel pit.
Gibbs remained the lead when the race resumed on Lap 71 and was followed by Cindric, Allmendinger and Harrison Burton.
Cindric powered to the inside of Gibbs on the restart to reclaim the lead.
Gibbs came back entering Turn 7 on Lap 72 to get back around Cindric as Allmendinger moved up to second.
Kyle Weatherman’s No. 47 came to a stop on the track on Lap 77 and he immediately exited the car, which brought out a caution. The race resumed on Lap 79 with Gibbs out front followed by Allmendinger, Cindric and Allgaier.
After racing side-by-side, Allmendinger got around Gibbs exiting Turn 1 to move into the lead after the restart.
With two laps remaining, Gibbs returned the favor and went to the inside of Allmendinger to reclaim the lead.
Allmendinger just edged Gibbs at the line to come away with the Stage 2 victory.
Cindric was third, Allgaier fourth and Gragson rounded out the top-five.
Following the break between Stages 1 and 2, most of the lead-lap cars pit with Allmendinger the first off pit road.
Harrison Burton was among those who stayed out and led the way on the restart on Lap 25 followed by Jones and Gibbs. Cindric lined up 12th.
Jones powered around Harrison Burton shortly after the restart and then Gibbs ran down Jones to take the lead for the first time on Lap 26.
With 10 laps remaining in the second stage, Gibbs had opened up a 2.49-second lead over Allgaier with Allmendinger up to third and Cindric in fourth.
On Lap 30, Jones was penalized for speeding on pit road while making a green-flag stop and had to serve a pass-through penalty.
Alex Labbe came to a stop on the track at the exit of Turn 1 on Lap 34 which forced NASCAR to display a caution.
A handful of cars decided to pit but Gibbs stayed out and remained the leader when the race returned to green on Lap 37.
As the field exited Turn 1, Allmendinger powered by Gibbs and into the lead for the first time in the race.
Cindric held off a strong charge from Allmendinger to take the Stage 1 win.
Hemric was third, Harrison Burton fourth and Jeb Burton rounded out the top-five.
Allgaier started on the pole but Cindric grabbed the lead after both got through Turn 1 on the first lap.
On Lap 4, Michael Munley got loose and slammed into the tire barrier near Turn 4 to bring out an early caution.
The race returned to green on Lap 8 with Cindric out front followed by Allgaier and Allmendinger.
NASCAR displayed a competition caution on Lap 11 to allow teams to check tire wear. None of the leaders elected to pit and Cindric remained out front on the restart on Lap 13.
With five laps to go in the first stage, Cindric had opened up nearly a 1-second lead over Allmendinger while Hemric ran third.
On Lap 18, Gibbs and Allgaier both pit for tires and fuel prior to the stage break.