Ramos' bases-loaded blast came during a five-run third inning that handed the Nationals an 8-0 lead.
Denard Span and Ian Desmond each went 4-for-4 with three runs scored and combined for five RBI while Bryce Harper drove in two more as Washington won for the third time in its four-game series with the Mets.
Rookie Taylor Jordan (1-3) earned his first major league win, limiting the Mets to one run on five hits over six innings. The right-hander walked one and struck out seven.
Mets starter Carlos Torres (1-2) was lit up for eight runs on nine hits, lasting just three innings.
Marlon Byrd got New York's only RBI.