Gonzalez (6-1) struck out nine batters, yielded three hits and worked around three walks for the Nationals, who took the first of a three-game series at Citizens Bank Park.
The left-hander improved his season's strikeout total to 69, nine more than teammate Stephen Strasburg for the best mark in the National League.
Sean Burnett had to rescue Henry Rodriguez in the ninth to pick up his second save after the Phillies had pushed across a run.
Ian Desmond homered and provided an RBI single to account for Washington's offense.
Kyle Kendrick (0-4) absorbed the hard-luck loss, allowing only two runs on five hits over seven frames.
Ty Wigginton got the only RBI for Philadelphia, which dropped its third straight.