Three long balls and a healthy Hyun-Jin Ryu made it a gratifying night for the Dodgers.

Adrian Gonzalez homered for the third straight game, Yasiel Puig and Hanley Ramirez hit back-to-back shots and the Dodgers defeated the New York Mets 4-3 on Wednesday.

Ryu (4-2) came off the disabled list and pitched the Dodgers to their 11th victory in 12 meetings with the Mets dating to July 1, 2012. Ramirez drove in two runs and L.A. enjoyed most of the vocal support from the 23,721 fans at Citi Field, many of whom turned out to cheer Ryu.

“I was faithful to my rehab and what the trainers told me. I felt good. I felt ready, mentally,” Ryu said through a translator. “I’m glad to be back and eager to get the team going in a winning direction.”

The lefty from South Korea, sidelined since late April with shoulder inflammation, went six innings and improved to 4-0 in five starts away from home this season. His return means the Dodgers have all five members of their projected rotation healthy together for the first time all year.

“Like he was never on the DL at all,” catcher A.J. Ellis said. “He was in razor form, and total command of all his pitches.”

Eric Campbell hit his first major league homer for the sputtering Mets, who fell to 5-14 in May with their sixth loss in seven games. David Wright, Juan Lagares and Wilmer Flores each had three of New York’s 13 hits.

The Dodgers managed only five — but all of them went for extra bases.

“Who needs singles, right?” Ellis said.

Jacob deGrom (0-2) gave up three solo homers over six innings in his second big league start. Pitching in place of injured Dillon Gee, the shaggy-haired righty wasn’t quite as effective as last Thursday, when deGrom went seven innings in a 1-0 loss to the New York Yankees.

Lagares tripled in the ninth and scored as second baseman Dee Gordon made a nice play on Daniel Murphy’s groundout. Kenley Jansen struck out Wright to end it.

Campbell hit a two-run shot in the sixth, when the Mets finally got to Ryu with four hits. Chris Young’s double-play grounder prevented what could have been a much bigger inning.

Ryu had thrown 33 straight shutout innings on the road since Sept. 24, 2013, at San Francisco.

“The guy’s a workhorse. When it’s his time to pitch, he prepares himself better than a lot of people that I’ve seen,” Dodgers reliever Brian Wilson said. “He knows what he’s doing.”

Brandon League protected a 3-2 lead in the seventh, retiring Young with runners at second and third to end the inning. Wright’s two-out double squirted a few feet behind a diving Puig in right, but Murphy didn’t appear to be running hard all the way and was held up at third base.

L.A. added an insurance run in the eighth when the Mets botched an opportunity for an inning-ending double play. Pinch-hitter Chone Figgins had a leadoff double against Jeurys Familia and scored on Ramirez’s comebacker with runners at the corners.

“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.