New York was trailing 5-3 with one out in the seventh when Eric Young collected a double against Mike Dunn and came home when Daniel Murphy followed with a run-scoring hit.
A.J. Ramos (3-4) took the mound and retired David Wright, but Murphy (three RBI) stole second, went to third on a wild pitch and came home with the tying run on Marlon Byrd's 3-2 liner into center field.
Davis then delivered the decisive blow, smacking a pitch down the right field line for an RBI double.
David Aardsma (2-0) earned the victory, while Josh Edgin and LaTroy Hawkins combined for two scoreless innings and Bobby Parnell racked up his 21st save as the Mets broke a five-game skid against Miami in the opener of a four-game series.
Jeff Mathis knocked in two runs for the Marlins.
Celebrity Families of 2014 [PHOTOS]