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.
Police: Sword-wielding man demanded free tacos
Sign language interpreter at Mandela service called out as fake on Twitter