Gonzalez (1-1) earned his first win despite allowing five runs -- four earned -- on six hits over as many frames.
Hanley Ramirez belted a two-run homer for the Red Sox, who were tying to sweep their opening home series for the first time since 2001.
Wade Miley (0-1) made a short, inauspicious Fenway Park debut. The offseason acquisition surrendered seven runs on five hits and three walks and was chased during the aforementioned third inning.
He threw 33 pitches in the first frame alone, with Bryce Harper doubling in a run and scoring on a Ryan Zimmerman triple into the right-field corner.
Washington's defense gave the runs back in the second inning. Mike Napoli's wind-aided triple went in and out of Michael Taylor's glove, and Shane Victorino knocked him in with a single. A Yunel Escobar error put runners on second and third, and Victorino scored on a Sandy Leon groundout.
Desmond's homer over the Green Monster got the Nationals going in the third. A single and two walks loaded to bases for Ramos, who cleared the bags with a double to left. Anthony Varvaro took over for the ineffective Miley and proceeded to give up consecutive RBI doubles to Dan Uggla and Taylor.
Ramirez's laser shot in the fifth and Brock Holt's RBI double an inning later pulled the Red Sox within 8-5, but Moore took Robbie Ross Jr. deep in the seventh to give Washington some more breathing room.
Rafael Martin made his MLB debut behind Gonzalez and struck out five in two innings of work.