Ramos clouted a solo homer among his four hits while Bryce Harper helped out with three hits as the Nationals posted their eighth victory in nine games.
Jordan Zimmermann (18-8) recorded his 18th victory, surrendering two runs on seven hits. He walked two and fanned seven and also drove in a run at the plate.
Phillies starter Tyler Cloyd (2-5) was roughed up for five runs on 10 hits over four full innings.
Millions of Getty images now available for free via embed tool
Aaron Carter is still in love with Hilary Duff