Jose Martinez, pinch-running for Molina, took third on the hit and easily scored on Wong’s fly.
Seung Hwan Oh (5-3) retired six batters for the win.
Brandon Moss hit his 27th homer for the Cardinals.
Hunter Pence singled twice and Brandon Belt added an RBI double for the Giants, who fell five games behind the first-place Los Angeles Dodgers in the NL West.
"Giving up the up the walk is what hurt," Giants manager Bruce Bochy said. "That’s a tough one. We played well."
Giants starter Jeff Samardzija allowed one run and five hits with four strikeouts and four walks over 6 2-3 innings.
St. Louis starter Mike Leake, who pitched his first career shutout during his final start of 2015 while with the Giants, allowed two runs over six innings.
Adams might not be the most nimble of infielders but the Cardinals first baseman flexed his defensive skills in the second inning when he made a diving catch on Denard Span’s liner, then quickly scrambled to the bag to double off Eduardo Nunez. Adams later left the game with a jammed left wrist. "I felt it when I swung the next time up," Adams said.
GOLD MEDAL MOMENT
Olympic gold medal-winning gymnast Aly Raisman, competing in nearby San Jose as part of a champions tour, threw out the ceremonial first pitch after spending time with several members of the Giants before the game. Raisman — who said she has only spent four days at home since returning from the Olympics — took pictures with Angel Pagan, and got tips from pitcher Johnny Cueto and hitting coach Hensley Meulens while sporting a Giants jersey.
"I went to a lot of (Boston Red Sox) games with my dad growing up," Raisman said. "I’m excited to be here. It was crazy when I came here and players know who I am."
Cardinals: The team isn’t sure what the next step will be for OF Matt Holliday after he called off plans to bat in a simulated game earlier in the day because of swelling in his right thumb. Holliday has been out since Aug. 12 and had hoped the sim game would provide momentum for returning.
Giants: Bochy plans to give Buster Posey the day off Sunday in order to give the All-Star catcher a break before the team begins a seven-game road trip.
Alex Reyes (1-2) starts for the Cardinals against Alberto Suarez (3-3) in the series finale.