Jed Lowrie doubled and, after the second out in the fifth, Seth Smith walked and Josh Donaldson singled to load the bases. John Jaso then had a base hit that chased San Francisco starter Tim Lincecum (3-5) from the game.
Lincecum allowed seven hits and six runs -- five earned -- in 4 1/3 innings. He has lost five of his last six decisions.
Freiman greeted reliever Javier Lopez with a single to center that allowed Seth Smith and Josh Donaldson to score and put the A's up 6-1 as Oakland went on to win its sixth consecutive game. He finished 2-for-3 with three RBI after entering the game in the fifth as a pinch-hitter.
Freiman added an RBI single, again knocking in Donaldson, in the ninth that accounted for the game's final run.
Donaldson, Coco Crisp and Smith all scored two runs to help Tommy Milone (5-5) collect the win. Milone scattered eight hits and four runs over his five-inning start.
San Francisco's Hunter Pence had three hits, including his ninth home run of the season. Brett Pill also had a solo home run for the Giants.
Beautician charged with giving client fatal silicone butt injection
Ohio bar shooting arrested, charged with murder