All the ingredients seemed to be in place for another dramatic Mets win.

They got another outstanding effort — and a homer — from Jacob deGrom, six straight shutout innings from the bullpen and numerous chances to score the go-ahead or winning run.

But after leaving a runner on third in both the 10th and 11th innings, the Mets’ luck finally ran out in a 2-1, 14-inning loss to the Braves at Citi Field, as Jeurys Familia faltered and their five-game winning streak was halted.

Familia gave up a pair of walks and two hits — including the go-ahead single by Billy Hamilton — and the Mets couldn’t rally in the bottom of the 14th against Mark Melancon.

Mickey Callaway said he considered walking Hamilton intentionally with one out and two on, but decided against loading the bases with Familia struggling to throw strikes and Ronald Acuna Jr. due up two batters later.

For all Familia’s issues on Friday, the offense failed the Mets as well, with their lone run coming on a deGrom homer in the sixth inning.

“It’s frustrating,’’ said Michael Conforto, who combined with J.D. Davis to go 0-for-10 out of the 3-4 spots in the lineup. “We had lots of opportunities. We didn’t have it today at the plate like we have in the past.”

The loss prevented the Mets from moving within a game of the Cubs, who lost to the Nationals earlier in the day, for the second NL wild card.

Familia’s problems started quickly.

He walked Tyler Flowers to start the 14th before former Met Adeiny Hechavarria hit a ground-rule double to center. The ball stuck in the fence, preventing Flowers from scoring.

After a visit from pitching coach Phil Regan, Familia struck out Rafael Ortega, but Hamilton’s grounder got through a drawn-in infield to drive in the go-ahead run.

The loss wasted another tremendous game from deGrom and just as good a showing from the bullpen.

DeGrom gave up four hits and a walk — and struck out 13.

Ozzie Albies had a one-out single in the sixth, stole second and scored on Freddie Freeman’s hit up the middle to put the Braves up, 1-0.

DeGrom answered in the bottom of the inning, when he led off despite having thrown 97 pitches. His opposite-field homer was deGrom’s second of the season and tied the game. It was also one of just two hits the Mets got off of Atlanta right-hander Mike Foltynewicz, who entered the game with a 6.09 ERA, but matched deGrom for seven innings.

Seth Lugo then tossed two shutout innings before the struggling Edwin Diaz got out of trouble in the 10th, fanning Acuna and Albies to escape a threat.

The Mets had a chance to win it in the bottom of the inning, when they loaded the bases with two outs against former Met Anthony Swarzak, but Amed Rosario struck out to extend the game.

Luis Avilan and Brad Brach combined to pitch a scoreless 11th before the Mets got two more runners on and pinch-hitter Aaron Altherr grounded out.

With the Mets wearing all-white Players’ Weekend uniforms that seemed designed to disguise players’ identities, deGrom’s brilliant second half continued. He hasn’t allowed more than two earned runs since June 28, as his ERA has dropped from 3.32 to 2.56, the lowest it has been since his third start of the season.

The right-hander ended up fanning eight straight before Albies broke the streak with a single that dropped in front of Juan Lagares in center with one out in the sixth.

His effort went for naught when Familia, who has pitched better since July — and very well in August — struggled while pitching for a third straight day.

Through an interpreter, Familia said he wasn’t as sharp as he has been since he hadn’t been accustomed to the workload.

Conforto, though, doesn’t think the loss will have a lasting impact.

“We still have that confidence,’’ Conforto said. “Tonight, we just didn’t do it. Simple as that.”