With the game tied 4-4 in the ninth, Daniel Descalso (3-for-3) delivered a one-out single off Pirates closer Joel Hanrahan (0-4) and pinch-runner Tyler Greene came around to score when Punto scalded a liner into the left-center field gap.
Punto moved to third on shortstop Pedro Ciriaco's fielding error and scored on a sacrifice fly by Albert Pujols, giving the Cardinals a win in their quest for the National League wild card.
Chris Carpenter started for St. Louis and yielded four runs on 10 hits over seven frames. He also provided a two-run single in the second inning.
Kyle McClellan (11-6) earned the win and Jason Motte picked up his sixth save for the Cards, who remained 4 1/2 games behind the Braves in the wild-card hunt.