Stanton then hit the first pitch way over the left-center wall near the animated home run sculpture for his seventh homer.
The walk-off loss was the second in the three-game series for the Mets, who concluded a 4-2 trip.
"We didn't finish the way we were hoping to finish," Acosta said through a translator. "It's a little tough to swallow."
Struggling reliever Heath Bell (2-3) earned the victory even though he gave up two runs in the top of the ninth.
Mets pinch-hitter Justin Turner broke a 2-all tie with a two-out, two-run double off Bell. Turner's hit came after a double by Daniel Murphy and a walk to Ronny Cedeno.
Mets starter Jonathon Niese pitched six innings despite an illness, and he departed for a pinch-hitter with a 2-0 lead.
"I had flu symptoms," he said. "I had kind of a runny nose with a sore throat and body aches. I just had to fight through it."
The lead lasted for only two batters when Ramon Ramirez replaced him. Bonifacio led off the seventh with a stand-up triple, and Buck followed with his fourth homer.
New York's David Wright went 1 for 3 and finished the series 8 for 14, which left his NL-leading average at 400. He also made three nifty plays at third base, including a reflex grab to rob Hanley Ramirez of a hit.
Niese stranded four runners in scoring position and benefited from two double plays, but he remained winless in his past five starts.
NOTES: Mets 1B Ike Davis was scratched from the starting lineup with flulike symptoms. He pinch-hit and grounded out to end the seventh with runners at second and third. ... Mets RHP R.A. Dickey said he felt fine one day after being hit on his right wrist by a pitch. He threw another two innings after being hit and earned his fifth victory. ... When Wright singled in the fourth, he improved to .154 lifetime against Carlos Zambrano (4 for 26) with 12 strikeouts. ... The retractable roof was closed for all three games in the series.
If you owe under $729k you may qualify for 3.05% APR Govt Refi Plans.