The place had gone from pandemonium to stunned silence in an instant, just as it has so many times when it comes to the Mets and Chase Utley.

The sellout crowd at Citi Field spent Friday night aiming its collective vitriol at a longtime nuisance, and in the ninth, they readied for the delight of him making the final out.

A moment later, they strained to believe that the Dodgers had rallied from four runs down against Jeurys Familia, and that the game-tying, three-run double came off Utley’s bat.

But before the crowd could finish muttering its curses, before the possibility of a wasted night fully set in, reprieve came in the form of one well-timed swing.

“I was hoping more so that it would be fair,” Curtis Granderson said when his walkoff homer in bottom of the ninth hugged the rightfield line and pushed the Mets past the Dodgers, 6-5.

Granderson knew it was gone, so long as it stayed inside the foul pole. And when it did, what was left of the 43,462 in attendance ignored their frayed nerves and let out a roar.

Even Utley, the Mets’ leg-breaking villain, couldn’t ruin the start of a weekend meant to honor the 1986 world championship team.

“Certainly, it picks you up,” manager Terry Collins said of the comeback. “You’re always shocked when Jeurys doesn’t come in and slam the door. But we had a chance to win the game in the last inning, and we did.”

That it came down to Granderson’s heroics seemed so far-fetched. David Wright homered for his third straight game. Juan Lagares finished with three RBIs, including a solo homer of his own, his first of the year.

Jacob deGrom turned in perhaps his best start of the season. Though he walked three and hit a batter, deGrom struck out seven, equaling the most he’s had in a start this season. Once more, he endured a fastball that wavered as the game went along and he suffered some spotty command.

“When you have your overpowering stuff, it feels like it’s a lot easier,” deGrom said. “When you don’t, you’ve really got to pitch, so I think I can take away learning how to pitch from this.”

Meanwhile, the Mets ruined the major-league debut of Julio Urias, the 19-year-old Dodgers prodigy. He had been billed as a second-coming of Fernando Valenezeula. Both are lefties. Both are from Mexico. The comparisons were easy.

By the time they were done, the Mets had made Urias look like just another teenager struggling on the first day of a summer job. He was finished after allowing three runs in 2 2⁄3 innings.

With a 5-1 lead entering the ninth, Collins did not want to take a chance. He summoned closer Familia, even in a non-save situation.

“In a game like that, you know what? You can’t worry about tomorrow,” Collins said. “You’ve got to win tonight.”

But Familia’s presence made that task tougher. He allowed a leadoff hit to Adrian Gonzalez and a swinging bunt to Howie Kendrick. Two batters later, Yasiel Puig loaded the bases with a one-out single.

Yasmani Grandal worked a bases-loaded walk to force in a run. Familia struck out pinch hitter Trace Thompson to bring up Utley, whose double stunned the crowd. But it wasn’t enough to ruin the start of a nostalgia-tinged weekend.

The Mets will honor the 30th anniversary of their last world championship team, which is why they trotted out their racing-stripe uniforms and prominently adorned their field with “1986.” Perhaps, they channeled some of that team’s grit.

“The fans actually did a good job of continuing to keep us motivated, which is definitely good having a packed house here for the ’86 weekend,” said Granderson, whose only other walkoff homer came in 2005.

For the first time since May 12, the Mets (28-19) are back in first place in the NL East, though tied with the Nationals.