The Cardinals moved two games in front of the Dodgers for the second of the National League's wild card spots, a position being battled for by at least six teams with less than three weeks remaining in the season.
St. Louis halted a three-game skid, getting seven strikeouts in six innings from starter Lance Lynn and three innings of one-hit ball from the bull pen.
It remained 1-1 until Craig delivered his two-out single in the seventh that brought in Shane Robinson from second.
Lynn (15-7) gave up a run on five hits. Jason Motte allowed a two-out double in the ninth before retiring Shane Victorino on a fly ball to left to end the game. It was Motte's 34th save.
Steven Rodriguez (0-1) allowed the run in the seventh and thus took the loss, his first in the majors in what was his third big-league relief appearance.