Huff then coaxed a base on balls from John Lannan (2-3), giving San Francisco a 2-1 lead and helping the Giants even their four-game set with Washington at one win apiece.
The victory went to Guillermo Mota (2-0) and Brian Wilson earned his eighth save despite a rocky ninth in which he issued a pair of walks and hit Jayson Werth with a pitch but struck out Adam LaRoche to end the game.
Lannan yielded both Giants runs in a 6 2/3-inning start, allowing six hits.
Rick Ankiel drove in the Nats' only run.
Beautician charged with giving client fatal silicone butt injection
LGBT community has 'bullied the American people': Bachmann