"Our guys at our shop have been digging," Stewart said. "None of these guys get down. We have been down but they haven't gotten down. That is what carries you to days like today at the end of the day."
Seven-time Dover winner Jimmie Johnson appeared to have the car to beat, but jumped a restart and had to serve a pass-through penalty. Johnson argued over the radio and stayed on the track before he finally hit pit road.
With Johnson out of the picture, Montoya and Stewart battled for the lead the rest of the race.
Jeff Gordon was third, followed by Kyle Busch and Brad Keselowski.
Stewart's team erupted in celebration in the pits after winning for the first time since last July in Daytona. It was his 48th career win. He hadn't finished better than 20th in his last four races at Dover.
He might not have gotten this one had Johnson not been penalized with about 19 laps left. Johnson jumped ahead of Montoya out of the restart box and NASCAR quickly threw the black flag.
"We certainly had the winning car," Johnson said. "We'll have to come back and do it in the fall."
Montoya's only two career Cup victories came on road courses. He tried to play the spoiler after Johnson's penalty but just didn't have enough to hold off a hard-charging Stewart.
Johnson, who kept the points lead, finished 17th.
"He just wanted to get the jump on me," Montoya said. "He just jumped it too much. I would have tried to do the same."
Sprint Cup standings
Driver Pts Beh
1. J. Johnson 473
2. C. Edwards 443 -30
3. C. Bowyer 423 -50
T4. M. Kenseth 399 -74
T4. K. Harvick 399 -74
6. D. Earnhardt Jr. 398 -75
7. K. Kahne 392 -81
8. B. Keselowski 375 -98
9. Kyle Busch 374 -99
10. P. Menard 371 -102
11. J. Gordon 361 -112
12. A. Almirola 354 -119