St. Louis won its third in a row and sits two games in front of the Los Angeles Dodgers for the National League's second wild card spot. The Dodgers finished a long day and night by splitting a doubleheader with the Washington Nationals.
Freese hit a two-run homer in the second and Molina had a solo shot in the fourth. Both have 20 home runs for the season.
Lance Lynn (16-7) grabbed the victory with a 6 1/3-inning effort, during which he gave up three hits with five strikeouts.
Lucas Harrell (10-10) allowed three runs on five hits over 5 2/3 to take the loss. It was the 101st loss of the year for the Astros.