Gonzalez (5-3) scattered three hits, issued a pair of walks and struck out seven in the dominating 119-pitch performance. The left-hander notched his second win in two starts after breaking an eight-appearance winless streak.
Denard Span went 3-for-5 with an RBI as the Nats banged out 13 hits in taking the rubber match of a three-game series.
Mets starter Zack Wheeler (1-1) was lit up for five runs on six hits over 4 2/3 innings.
John Buck drove in both New York runs.