Wainwright (13-5) allowed eight hits and two walks but struck out seven to become the first National League pitcher to reach the 13-victory mark.
The right-hander lowered his ERA to 2.44 while pinpointing 71-of-102 pitches for strikes in the effort, which gave the National League Central-leading Cardinals the rubber match of a three-game series.
Closer Edward Mujica, however, had to work out of jam in the ninth with the Cards leading by a one run for his 28th save.
He caught a break when Jesus Guzman's two-out, pinch-hit double with Alexi Amarista aboard hopped over the fence, forcing Amarista to return to third.
Mujica then surrendered a long fly ball to Jedd Gyorko that Allen Craig leaped to catch at the left-field fence, ending the contest.
Craig also knocked in two runs with a third-inning single and David Freese followed with an RBI hit for a 3-1 St. Louis advantage.
The Padres' Eric Stults (8-8) took the loss, yielding three runs on eight hits i six innings.
Yonder Alonso went 3-for-4 with an RBI for San Diego.
Celebrity Breakups and divorces of 2014 [PHOTOS]