Rogers allowed three hits in five innings, helping the Brewers win for the fifth time in six games.
Bedard (7-14) lasted only 4 2-3 innings and leads the majors in losses.
Milwaukee entered this series having gone 1-14 on the road since the All-Star break but took two of three.
Rogers (2-1) won six days after picking up his first victory in the majors. He walked three and struck out five, throwing 101 pitches.
Although he was not the most efficient, Rogers did not allow a baserunner to reach third base during his outing. The fifth overall pick of the 2004 draft, he was making his eighth career start and sixth this season.
Bedard did not allow a hit through 3 2-3 innings, but six of the final nine batters he faced did have a hit and each scored.
Two-out singles by Corey Hart and Lucroy in the fourth preceded Gomez’s 13th home run.
Rogers led off the next inning with a double and scored on Rickie Weeks’ one-out single. Two batters later, Ramirez hit his 18th homer.
Formerly with Pittsburgh, Ramirez went 6 for 12 in the series with an extra-base hit in each game. His 62 extra-base hits lead the National League.
NOTES: Before the game, the Pirates activated LHP Hisanori Takahashi to the active roster and placed RHP Chad Qualls on the disabled list with irritation of his left big toe. Claimed off waivers from the Los Angeles Angels on Friday, Takahashi pitched a perfect eighth. ... The crowd of 36,626 was the 16th sellout of the season at PNC Park. The stadium record is 19. ... Looking for their first winning season or playoff berth since 1992, the Pirates open what is arguably their biggest series in two decades Monday against the Cardinals. Aces start it out: Pittsburgh’s A.J. Burnett (15-4, 3.63 ERA) and Kyle Lohse (13-2, 2.61) of St. Louis. ... The Brewers embark on a four-game series in Chicago. Milwaukee swept the Cubs at home prior to arriving in Pittsburgh.