DENVER — Either it’s better to be lucky than good, or Mickey Callaway is playing intergalactic chess while the rest of us are stranded in Candy Land.

Been away this entire roller coaster of a Mets season? You could’ve just watched Wednesday’s game and grasped their primary theme: Don’t count them out, even when you suspect them of self-sabotage.

The Mets outlasted the Rockies, 7-4 at Coors Field, in a seesaw contest that featured one of the most confounding in-game decisions among Callaway’s list of grating-est hits. And just when it seemed like that act of omission would send the Mets reeling into Cincinnati, one huge step closer to their graves, it actually paid off. Wilson Ramos — shunned in both the first and the sixth innings — drew a pinch-hit, leadoff walk in the ninth to initiate the come-from-behind, game-winning, four-run rally and, ironically, acquit his awkward dance partner Noah Syndergaard of a second straight loss.

“I think it was being patient,” Callaway said afterward of the key to his guys’ at-bats in the ninth, yet the manager could have been referring to his deployment of his assets that transformed from eyebrow-raising to visionary in a blink.

Hence the Mets won the series and moved within three games of the Cubs and Brewers for the second National League wild-card. Furthermore, the Mets’ ninth-inning rescue mission averted what would have been an off-day focused on the futures of Callaway and Syndergaard. The shorter term remains interesting enough to mitigate some of that.

Really, this contest offered a CliffsNotes of sorts for what has transpired in this Mets campaign.

A Pete Alonso homer? Check, his 49th, in the sixth inning, and for good measure, his bases-loaded walk in the ninth against former Yankee Joe Harvey broke the 4-4 tie.

A Syndergaard catching controversy? Yup. Thor, paired with Rene Rivera over Wilson Ramos in the wake of two consecutive poor showings of the Syndergaard-Ramos battery, pitched slightly better, though he still gave up four runs (in 5 ²/₃ innings) for his third straight start.

A Callaway doozy? OMG, yes. And this one, like others of recent vintage, wound up somehow paying off, like when the killer in “Match Point” accidentally leaves behind a key piece of evidence, only for that evidence to fall in the hands of an innocent who consequently gets blamed for the murders.

The Mets had the bases loaded and two outs in the top of the sixth, trailing 3-2, when the light-hitting Rivera’s turn in the order arrived. Thanks to his loaded September roster, Callaway enjoyed a smorgasbord of intriguing pinch-hitting options. He could have gone with lefty-hitting Joe Panik, knowing that no one was warming up in the Rockies’ bullpen. He could have taken a shot with Ramos or J.D. Davis from the right side. And he still would have Tomas Nido, Syndergaard’s other favored receiver, to insert behind the plate as Rivera’s substitute.

Instead, the manager chose the path of least resistance and most perplexity.

“The main thing was, Noah was still probably going to pitch there. That was the main thing,” Callaway said. “And Rivera’s a good hitter. He hit 25 homers [for Triple-A Syracuse this season].”

Insert your skeptical narrator: “Rivera is not a good hitter.”

The 36-year-old owns a career slash line of .221/.272/.352 in 1,540 plate appearances. Home runs in Triple-A have exploded this season thanks to the implementation of the major league ball. As if happened, Rivera grounded out to Rockies shortstop Trevor Story to end the threat.

Get the pitchforks ready, right? Not with these 2019 Mets. One run from each team later, with Rivera set to lead off the ninth, Callaway turned to Ramos, who walked. Then Davis, who had entered the game in the eighth as part of a double switch, singled to right field, advancing pinch-runner Juan Lagares to third base. And off they went, two more singles and two more walks (including Alonso’s) leading to the final tally and a boisterous Mets clubhouse.

“We got the win. That’s all that matters,” an admittedly disappointed Syndergaard said. And back onto the roller coaster they and we go, wondering what innovative mix of confusion, nausea and elation will come next.

Purchase event tickets to The Amazin’ 1969 New York Mets: A World Championship for the Ages presented by The Paley Center for Media and New York Post. Enter promo code: NYPOST to unlock tickets only available for Post readers.