The Marlins rallied from an early 3-0 deficit to take a 5-3 lead in the eighth, but they gave up a run in the bottom half of that inning and then lost it in the ninth when Frankie Francisco could not hold a one-run advantage.
Francisco (1-2) entered the game in the ninth as the fifth Miami pitcher and promptly gave up a double to Giancarlo Stanton.
Dobbs, however, singled on the first pitch from Francisco to bring the Marlins their second straight win. New York has lost six in a row.
Austin Kearns hit a two-run homer as part of Miami's three-run first. The Mets scored single runs in the fifth and seventh and took the lead with a three-run eighth that included a two-run double from Mike Baxter.
The win went to Heath Bell (1-3), who retired the side in order in the ninth.
Selena Gomez drops F-bomb, walks off stage during Jingle Ball performance
'SNL': 'Anchorman 2' cast, One Direction sing 'Afternoon Delight' [VIDEO]