Walker was 4-for-5 with three runs scored for the NL Central leading Cardinals, who ended a three-game losing streak.
Jayson Werth had a two-run homer and scored twice for the NL West leading Dodgers, who had a five-game winning streak halted.
Steve Finley added a pair of hits and RBI for Los Angeles.
Edwin Jackson (2-1) suffered the loss, allowing one run on one hit in two innings of work.
Chris Carpenter (15-5) got the win, despite yielding six runs on eight hits in five innings.
The Cardinals bullpen combined to work four innings on one-hit ball with Jason Isringhausen recording the final four outs for his 41st save of the season.