The Cardinals led by 3-1 in the sixth inning and 6-4 in the eighth, only to see the Cubs rally each time to knot the score.
But St. Louis finally broke it open in the top of the ninth when Carlos Beltran doubled off Kevin Gregg (2-2), went to third on Dave Sappelt's error and scored the go-ahead run on a hit by Allen Craig (4-for-5).
After David Freese singled to put two runners on base, Molina followed by belting a pitch into the left field bleachers, icing the contest.
Pete Kozma went 3-for-6 with two RBI as St. Louis banged out 21 hits and earned a split in the four-game series. They headed into the All-Star Game break with a one-game lead over Pittsburgh in the National League Central.
Edward Mujica (2-1) notched the decision after blowing a save in the eighth.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Kate Middleton recycles dress at movie premiere