Chambers, who had entered the game earlier as a pinch hitter, brought in Clint Barmes, who slid under Russell Martin's tag to give St. Louis the win and pull the Cardinals to within two games of the first-place Pirates in the NL Central.
Pittsburgh built up a 3-0 lead in the first two innings but did not score again. St. Louis tied the game with a run in the ninth on an RBI single by Allen Craig.
Sam Freeman (1-0) got the win as the last of five St. Louis relievers who worked after Adam Wainwright departed after seven innings.
Jared Hughes (2-3) took the loss after allowing a run on two hits. Andrew McCutchen and Jordy Mercer both homered for the Pirates off Wainwright.