The victory completed a three-game sweep at AT&T Park and gave the Giants a 7-0 mark against the Nationals this season.
They swept a four-game series at Nationals Park from June 6-9.
Roberts' second single of the contest followed a sacrifice bunt by winning pitcher Matt Cain with one out in the bottom of the eighth.
Aaron Rowand also had two hits for the Giants, who had not swept a season series since going 6-0 against the New York Mets in 2002.
Cain (6-8) hurled a complete game, yielding just four hits with no walks and four strikeouts.
Four players had one hit for the Nationals, who have lost six of seven.
Losing pitcher Tim Redding (7-5) surrendered just the earned run and seven hits in eight innings with no walks and five strikeouts.


