The Marlins, who led by two runs heading into the seventh inning, entered the game with a 27-4 record when leading after six.
For Miami, it was a rare night the relievers coughed up the lead. The bullpen has been a strength, especially since June 1, which was about the time the team started making dramatic improvements.
Since June 1, Miami's relievers have allowed 55 runs, the fourth fewest in the National League in that span.
"As good as they've been, they're going to have some hiccups," Marlins manager Mike Redmond said.
Five of the Mets' six runs came as a result of two-out, run-scoring hits. Mike Dunn was charged with two runs in the seventh inning, and A.J. Ramos gave up one run in the frame, as he was tagged with a blown save and the loss.
"Usually, when [Dunn] comes out, it's lights-out," Redmond said. "Ramos made a couple of mistakes, too, but then settled in the [eighth] inning."
The Marlins are now 8-4 on the season against the Mets. Like so many of the other contests, this one came down to the wire.
"We're in every ballgame," Dunn said. "We had the winning run on base in the ninth inning tonight. We were ahead going into the seventh. We were right where we wanted to be. It just wasn't in the cards for us tonight.
"We've been playing tight games all year -- one-run ballgames. It's a matter of shutting the door."
Mets closer Bobby Parnell picked up his 21st save, but not without some difficulties.
In the ninth inning, the Marlins had runners on first and third with two outs, but Parnell got Giancarlo Stanton to bounce out to second.
A pinch-hit single by Greg Dobbs with one out in the ninth inning started the threat. Juan Pierre pinch-ran for Dobbs, and he stole second. With two outs, Christian Yelich drew a walk, but received a break in the process. Parnell's fifth pitch, called a ball, was actually right down the middle of the plate, according to MLB.com's Gameday, which tracks pitches.
Yelich was able to walk, and on the play, Pierre took third on defensive indifference. Yet, the potential rally fizzled, and Miami dropped the first of four games against New York.
Miami right-hander Jacob Turner was in line for the win before the late-inning letdown. In 6 1/3 innings, the 22-year-old gave up three runs on five hits with three walks and four strikeouts.
"I didn't feel great out there, but I was able to get out of situations I put myself in," Turner said. "But I have stuff to work on in between starts. The walks didn't kill me tonight, and they could have. I just have to be a lot better of getting ahead and staying ahead."
Turner threw first-pitch balls to 16 of the 27 batters he faced. The Mets were 5-for-13 with three walks after 1-0 counts against Turner.
After throwing only 20 pitches in the first two innings, he labored through the next four, averaging 18 pitches per frame.
The back-and-forth game swung in the Mets' direction for good in the seventh, when they scored three runs to gain a 6-5 lead.
Turner faced one batter to open the inning, and he induced Josh Satin to ground out to short. Dunn entered in relief and allowed a double to Eric Young Jr. and an RBI single to Daniel Murphy.
"I was ahead of Murphy and threw a good slider," Dunn said. "He just stayed on it to get enough of it to hit it to center field."
Ramos replaced Dunn, and after David Wright lined out to right field, Byrd delivered an RBI single, tying the game. New York claimed the lead on Davis' double down the right-field line.
"I'm seeing the ball well, so I was just looking for something out over the dish to hit hard somewhere," Davis said. "I got a fastball in, and stayed through it and hit it pretty hard to right field."
Miami had gone ahead in the sixth inning on Jeff Mathis' two-run single, which knocked Jeremy Hefner out of the game.
Ed Lucas walked to open the inning, and with one out, Jake Marisnick singled to left. Lucas raced into third, and when the throw went in his direction, Marisnick took second. With a couple of runners in scoring position, Mathis slapped his go-ahead single to left.
A wild two-out error by Mets shortstop Omar Quintanilla led to the Marlins scoring two unearned runs in a three-run fourth inning, which tied the game at 3.
The Marlins made the most of their six hits, scoring five times. While the Mets had 10 hits, both teams left seven on base.
"At the end of the day, we brought our best hitter up with first and third in the ninth, and we gave ourselves a chance," Redmond said.