"I got a little confused because I didn't want to throw it away," Familia said.
Wilson worked a scoreless inning and Jansen got three outs for his 13th save in 15 attempts.
Gonzalez homered into the second deck in right field leading off the second, his 12th of the season. The slugger hit a two-run shot in the series opener Tuesday night and has nine hits in his past 16 at-bats.
"I went where I wanted to go with the high fastball. He caught up to it," deGrom said.
It's the third time this season Gonzalez has gone deep in at least three consecutive games.
Puig sent a solo drive to left-center in the sixth for his 10th of the year and Ramirez followed with his seventh, the second time the Dodgers have gone back-to-back this season.
Puig has hit safely in 18 of his last 19 games, batting .408 with seven homers and 23 RBIs during that stretch. He was the NL co-player of the week last week.
Ryu scattered five hits over the first five innings and struck out Curtis Granderson with the bases loaded to end the third. That left the Mets 6 for 41 (.146) with the bags full this season.
NOTES: League hasn't allowed an earned run in 21 1-3 innings over 14 outings since April 16. ... Gonzalez and Andre Ethier hit consecutive home runs April 4 against San Francisco. ... Los Angeles placed 3B Juan Uribe (strained right hamstring) on the 15-day DL. Justin Turner started at 3B and went 0 for 4 against his former team. ... Lagares returned from the Dominican Republic and was back in the lineup after missing Tuesday night's game because of a death in the family. ... A college shortstop, deGrom singled to start the fifth and has the only two hits for Mets pitchers in 74 at-bats this season. ... LHP Jonathon Niese (2-3, 2.54 ERA) faces Dodgers RHP Zack Greinke (7-1, 2.03) in the series finale Thursday night.