Harper's solo homer in the sixth inning broke a scoreless tie, but the Giants tallied an equalizer two frames later when Angel Pagan scored on Buster Posey's one-out RBI single off reliever Drew Storen.
Washington struck in the 10th when Harper doubled off Jeremy Affeldt (1-1) with one out. Ryan Zimmerman was intentionally walked to get to Ian Desmond, who responded by sending a sharp ground single through the hole into right field for the decisive RBI.
Washington's Gio Gonzalez yielded one run on four hits over 7 1/3 innings in a no-decision.
Giants starter Madison Bumgarner went seven innings, surrendering one run on four hits.
McPhee, Cokas 'working on their marriage' after affair
Beautician charged with giving client fatal silicone butt injection