The Mets got a taste of their own come from behind medicine when a botched double play put a damper on starter Tommy Milone’s stunning Citi Field debut.

Picked up on waivers from the Milwaukee Brewers, Milone (1-0, 6.43 ERA) made quite a statement, pitching five plus-innings of two-run ball, striking out five while giving up a two walks.

In failing to sweep the San Francisco Giants, New York falls back to one game below .500 in a painful 6-5 loss that was theirs for the taking.

Giants right-hander Matt Cain was on a mission to redeem himself after rocked for nine runs in his previous outing against the Cincinnati Reds.

Curtis Granderson got to him early in the first doubling home Jose Reyes from second after a walk and a stolen base.

Buster Posey, feeling right at home on the road in Flushing, tied it up in the top of the second, launching his third long ball in as many games.

In the bottom of the third Jay Bruce put the Mets back in the driver’s seat with a solo shot to right center for his 10th of the season.

Granderson reached first in the fourth on a gift from a fielding error off of Buster Posey’s glove. Wilmer Flores singled on a sharp ground ball to center field, proving he’s not just a left-handed pitching hitting wonder. And with two outs, Milone, who hadn’t batted much on the Brewers, belted an RBI base hit to extend the Mets lead 3-1.

Posey and Christian Arroyo, who had been hitless since coming to Queens, led off the sixth with back-to-back singles. Fernando Salas relieved Milone and immediately surrendered a base hit to Nick Hundley to load the bases.

Then Justin Ruggiano, one of the few successful batters during Milone’s reign, hit a sac fly to right, plating Posey to pull within one.

Giants reliever George Kontos replaced Cain in the bottom frame, and NY filled the bases on a Flores line drive to right, a beautiful bunt single by Juan Lagares, and a walk to Kevin Plawecki.

But Kontos was a Mets buzz kill striking out Asdrubal Cabrera and Jose Reyes, swinging.

In the seventh Jay Bruce and Neil Walker tried to get something going with a single and a walk, only to return to the dugout empty handed after Granderson and Flores couldn’t convert.

Clinging to a one run lead in the top of the ninth, Jeurys Familia came in for the save and the sweep, but after getting Conor Gillaspie to line out to left, the inning took an ugly turn.

After Joe Panik walked on a 3-2 count Eduardo Nunez hit a would be double play ball to third base that Wilmer Flores through wide of second for an error.

Hunter Pence followed with a game tying single, Familia walked Posey, and then Christian Arroyo hit a bases clearing double into the gap for a three run lead.

The Mets, with enough drama to fill a season of “Law and Order,’ two runs in the bottom of the inning off of Flores’ double to redeem himself, but that’s as close as it came. So as they head into a day off on Thursday here’s hoping that Matt Harvey is not a head case come Friday.