Even in the field, Alvarez made a couple of sparkling plays, including fielding Eric Young's bunt to open the game.
Behind Alvarez's all-around performance, plus a solo home run by Jake Marisnick, the Marlins snapped a two-game slide to the Mets, with the fourth game of the series set for Thursday afternoon.
"He wants to be the guy everyone's talking about," Marlins manager Mike Redmond said. "He doesn't want to get left behind. Like I've said, competition is great, for pitchers especially. Those guys are pushing each other. He went out there tonight like, 'Hey, I want to stop this losing streak. I'm going to do everything I can, offensively and pitching-wise, to end the losing streak.'"
The Marlins improved to 9-5 on the season against the Mets. But these two teams, both armed with talented, young rotations, have had close encounters all season.
Wednesday was the second one-run game of the series, and on Tuesday night, New York won 4-2 in 10 innings.
"Every one of these games we play against those guys is close," Redmond said. "Every run is huge. It seems like both sides, we have trouble adding on runs. For whatever reason, they make some pitches and get out of jams, and so do we. They've been tight. But today, we got on the right end of that one."
Making his sixth start since coming off the disabled list in mid-June, Alvarez established a team high for the season by reaching 18 straight scoreless innings over three starts.
Prior to Ike Davis' RBI double in the sixth inning, Alvarez hadn't given up a run since the seventh inning of his July 14 start against the Nationals.
The right-hander entered Wednesday with a 13 straight scoreless frames, and he boosted it by five before New York produced a pair of two-out hits in the sixth to snap the streak.
Alvarez's 18 consecutive scoreless innings topped Ryan Webb's 17 1/3-inning streak that was snapped on May 21.
Unaware of the streak, Alvarez, a Venezuela native, said in Spanish: "I was just focused on hitter by hitter and executing my pitches. I felt I did a good job of that."
On a night closer Steve Cishek wasn't available, the Marlins needed a strong start from Alvarez. Cishek threw two innings in Tuesday's loss.
Mike Dunn worked 1 1/3 innings, logging his second save of the season, and first since May 19 against Arizona.
The Marlins opened the scoring in the second inning on Marisnick's two-out home run. In his ninth game since being called up from Double-A, the 23-year-old connected on his 29th at-bat. The blast was also his first extra-base hit.
"It was the farthest thing from my mind," Marisnick said. "I was looking to put good at-bats together, like I had the last couple of days. I'm feeling more and more comfortable at the plate. That's just a product of that. I'm feeling more comfortable and putting more at-bats together."
Miami added two runs in the third inning, with Alvarez helping his cause with a leadoff infield single. He advanced to third on Christian Yelich's double to left.
Placido Polanco and Giancarlo Stanton each collected RBIs on sacrifice flies, giving the Marlins a three-run lead.
The Mets were able to break through off Alvarez for a run in the sixth inning on Davis' RBI double to right. Marlon Byrd kept the inning alive with a two-out infield single.
Alvarez caught a break in the third inning on Eric Young's two-out triple off the top of the padding on the wall in center field. The ball was inches from clearing the fence. Mets manager Terry Collins argued whether the drive was a home run.
"I thought it came off the wall funny," Collins said. "That's why I came out."
Crew chief Joe West and the umpires huddled and exited the field to check out the replay. After a couple of minutes, they returned and held up the initial call.
"I couldn't tell when it first hit," said Marisnick, Miami's center fielder, who had the closest view. "It looked like it came back in. That's how I played it. It looked like it hit the top of the wall and popped back in. I think that is what ultimately happened. It looked like, from my angle, it stayed in."
It was a big play, because after issuing a two-out walk to Daniel Murphy, Alvarez retired David Wright on a fly ball to right.
"After losing the first two games of the series, and two close games, Alvarez went out there and did exactly what we wanted him to," Redmond said.