Gio Gonzalez settles down after a rough first inning to strike out 11 in seven near-dominant innings to keep the Nationals close enough to tie the game in the ninth and win it in the 11th. (Brian Garfinkel/Getty Images)

Jayson Werth arrived at this point of his career — loathed by one city, adored by teammates, rich beyond his dreams — in part because of the twisted intensity within him. On Tuesday night, Werth had been asked how he avoids dwelling on losses neither he nor his team expected would pile up so quickly. Within a thoughtful answer, he concluded, with a slight grin, “You’ve got to show up tomorrow ready to eat somebody’s face.”

Ballplayers, Werth argued, forget the gloom in their recent past or they cease to be ballplayers. On Wednesday night, the Washington Nationals were half-buried after eight innings and down to their last out in the ninth. Then they showed up ready.

Werth’s RBI single with two outs in the ninth forced extra innings, and in the 11th Ian Desmond smashed a grand slam to lift the Nationals to a 6-2 victory. Just when they appeared headed for a new nadir, the Nationals’ offense enlivened enough to avoid a series sweep, snap a three-game losing streak and keep the team from falling into third place.

“The Phillies, we needed to show them that we’re still hanging around,” Manager Davey Johnson said.

Before Desmond smoked the grand slam, he had struck out three times, including once with a runner on third base in the ninth inning. “God, just give me another chance,” Desmond thought. In the 11th, he came up with the bases loaded. He fell behind, 0-2, and he took a pitch on 1-2 that, on another day with a different umpire behind the plate, may have been strike three. On Wednesday night, he caught a break and then delivered the biggest hit of the Nationals’ season. The dugout erupted.

The Post Sports Live crew debates whether Danny Espinosa will return to his position at second base with the way Anthony Rendon is hitting. (Post Sports Live)

“That’s like I remember it from last year,” catcher Kurt Suzuki said.

On Tuesday, Werth and Desmond had discussed the Nationals’ need to develop an identity for this season. Werth believed the Nationals needed a comeback win or late-inning magic, some kind of jolt. It arrived a night later.

“Really, we got lucky,” Werth said. “We stole this one. It was one of those games that you need if you’re going to go on to win the division. You need a bunch of wins like this.”

Gio Gonzalez exited the game long before Desmond won it, but his seven dominant innings kept the Nationals alive. Gonzalez surrendered a leadoff single and then a two-run homer to Michael Young. For the remainder, he allowed no hits, walked two and struck out 11.

“He’s a perfectionist, and he doesn’t want to give up runs,” Suzuki said. “His job is to keep us in the ballgame. He’s starting to understand that he can give up a couple runs in one inning and make sure you bear down the rest of the game.”

For two minutes, the Phillies plastered a pair of pitches from Gonzalez. For eight innings, the Nationals swung wet newspapers against Kyle Kendrick. Werth still pushed the game into extra innings with two run-scoring singles against his old team, the hits boring through boos.

The comeback led to the 11th. Ryan Zimmerman had looked helpless against fastballs in his previous two at-bats, but Michael Stutes fed him a 3-2 curveball, and he lashed into the left-center field gap for a one-out double. Phillies Manager Charlie Manuel called for an intentional walk of Adam LaRoche, bringing Werth to the plate. He walked to load the bases.

The Post Sports Live crew discusses whether the Nationals can win a wild card spot without Bryce Harper in the lineup. (Post Sports Live)

Desmond entered the night batting .410 in his career with the bases loaded, but the night had been a struggle — 0 for 4 with three strikeouts.

“My swing was not good from the first at-bat,” Desmond said. “It was getting better and better throughout the game. I was thinking the exact same thing: See the white ball and put the barrel on it. That’s what I always think.”

Desmond fouled off the first pitch and could not check his swing on the next, quickly falling behind, 0-2. He fouled away another pitch. He ducked out of the way of a fastball at his chin, then took a 1-2 pitch that some 30,000 umpires believed to be a strike. Plate umpire Alfonso Marquez called it a ball, and Desmond remained in the box.

“I thought it was in,” Desmond said. “[Marquez] had a great strike zone all night long. He was consistent with it. And I trust him to make the right call there.”

Desmond expected either another fastball in or a slider, the pitch he was unable to check his swing on. Stutes fired an 83 mph slider, and Desmond was not fooled. He blasted it into the seats. First came the groans, then an exodus.

Werth ripped a two-out, RBI single in the seventh, the only run the Nationals scored off Kendrick. In the ninth, closer Jonathan Papelbon jogged in for the third straight night. As Papelbon pitched to leadoff hitter Denard Span, Werth noticed the scoreboard radar gun flash “91.” He turned to Zimmerman in the dugout and mentioned the diminished velocity.

“You know, we had a sense,” Werth said. “We had a sense that we could get to him. He’s tough. He really is. But definitely seeing him last night helped.”

Span gave the Nationals a base runner when he reached on an infield single — Papelbon covered first but could not corral second baseman Freddy Galvis’s low throw. Anthony Rendon lined out to left field, and Zimmerman whiffed at a fastball down the middle. LaRoche drew a five-pitch walk, pushing the tying run into scoring position.

The boos began before the public address had announced Werth’s name. He strutted toward the plate and stopped halfway there, taking two extra warmup swings as the ire cascaded. He may have left Philadelphia three years ago for an offer that paid him $70 million more than what the Phillies offered, but they neither forgive nor forget here.

“I’m just trying to see the baseball,” Werth said. “That stuff kind of fades away more and more, the older you get the more you play.”

Werth does not make a habit of swinging at the first pitch, but Johnson has been preaching aggression to the entire team, and Werth wants to follow along. Papelbon fed Werth a first-pitch fastball. Werth rolled it through the left side of the infield. Span sprinted around third base and slid home as the ball was cut off. Werth rounded first and watched the end of the play, giving one big clap as he headed back to the bag.

A few innings later, the Nationals packed their bags and headed back to Washington, where they play 13 of their next 16 games. The Nationals have had other nights they thought would change their season, and they have not given up hope that one of them actually will.

“At some point, it’s going to turn,” Werth said. “Hopefully this will be the turning point and we can take off from here.”