Paul Goldschmidt homered and had two RBI for the Cardinals, who have won five of six.
Wainwright (16-7) had just one 1-2-3 inning but worked out of trouble by stranding seven runners — including the bases loaded in the first, when he struck out Jeff McNeil on three pitches.
Rich Hill (6-7) allowed three runs and six hits in five innings.
RHP Jake Woodford (2-3, 4.38 ERA) will go for the Cardinals Tuesday, 5:15 with the pregame and the first pitch at 6:10 on KIRX.
The Dodgers are the number one wild card team, 16 1/2 games ahead of number two Cincinnati, the Cardinals and Padres are each a half a game out, the Phillies are 2 1/2 out, the Mets are now 3 1/2 back.