Wainwright (17-9) gave up two runs in the first and then found his groove to earn his 17th win, second-most in the NL this season.
He went 3 for 3 with a double and two RBIs to help the Cardinals stretch their lead to two games over Pittsburgh after the Pirates lost 3-2 loss to San Diego. St. Louis also reduced its magic number for clinching a playoff spot to three with 10 games to play.
Tyler Chatwood (7-5) allowed four runs in six innings before being lifted for a pinch hitter. Chatwood is rounding back into form after missing nearly a month with an inflamed right elbow.
The hard-throwing Wainwright allowed 10 hits and struck out eight before running into a jam with two on and two outs in the eighth. Reliever Trevor Rosenthal got Charlie Blackmon to ground out to end the threat. Edward Mujica pitched his way out of a bases loaded mess in ninth for his 37th save in 40 chances. He struck out Todd Helton, who's retiring at the end of the season, to quiet the cheering crowd and end the game.
Michael Cuddyer remains the NL batting leader, keeping his average at .331 after going 1 for 3 on Wednesday. Cuddyer left the game shortly after making an inning-ending diving catch in the sixth. The team announced he was day-to-day with a bruised right forearm.
Cuddyer, a career .271 hitter entering this season, has a slight lead in the batting race over Atlanta's Chris Johnson (.327).
St. Louis solved Chatwood in the third, stringing together four straight hits to tie the game at 2-all. Wainwright had an RBI double and Matt Carpenter followed with a run-scoring single. Carpenter now has 67 RBIs from the leadoff spot, the most by a Cardinals player since Lou Brock had 76 in 1967.
The Cardinals took the lead for good in the fourth when Yadier Molina led off the inning with a double and was brought home by Wainwright's single. He now has five RBIs this season.
The Rockies began the game with four straight hits off Wainwright, including a two-run single by Troy Tulowitzki. That was certainly more offense than the Rockies had off Wainwright in May, when the Cardinals ace took a no-hitter into the eighth and finished with a two-hitter during a 3-0 victory.
Wainwright escaped more trouble in the first by getting Helton to hit into a 3-6-1 double play. Jordan Pacheco followed by lining out to Matt Adams to end the inning.
This is Helton's last hurrah after announcing he was calling it a career after 17 years. Manager Walt Weiss said he plans to start Helton in each of the remaining nine games.
"I'm going to play him as much as he's physically able to do it," Weiss said. "Give the fans an opportunity to see him."
Helton had a double in the sixth, the 587th of his career.
Notes: Cardinals RHP Joe Kelly (right calf tightness) hopes to be ready for his next start. "Personally, I think I can go," Kelly said. "It's just something that you don't want to go out there and not be 100 percent and mess it up worse." ... Adams left the game in the seventh with right elbow soreness. ... Broncos DBs Omar Bolden and Duke Ihenacho were on the field for batting practice before the game. ... Rockies OF Carlos Gonzalez is visiting a hand specialist in Cleveland about his sprained right middle finger.
Link to box score: St. Louis 4 at Colorado 3
Link to game discussion at The Cardinal Nation message board