Gio Gonzalez allowed three runs on six hits in seven innings and struck out eight in the Nationals’ 12-3 win over the Marlins. (Mike Ehrmann/Getty Images)

Gio Gonzalez entered Tuesday night’s eventual 12-3 win over the Miami Marlins needing nine strikeouts for 1,500 in his career. The word “need,” of course, is relative there. Whether Gonzalez hit that milestone does not matter much in the end. Still, it certainly would have been nice.

His Washington Nationals entered the game in a similar state of relative need, needing a win to jump 15 games over .500 again, to steady their bullpen and to stiff-arm the sneaky-good Marlins into their proper National League East place. No game qualifies as a must-win in June, but after letting a six-run lead slip as they drained their bullpen Monday, a game won, like a milestone reached, certainly would have been nice.

As it happened, Gonzalez did not get the nine strikeouts he needed. He got eight. That was plenty.

Gonzalez gave the Nationals exactly what they needed all the same, providing seven solid innings to alleviate pressure on that exhausted bullpen. The Nationals offense provided Gonzalez all he needed, too, scoring six runs with two outs. In the end, the Nationals got the win they needed to steady themselves, to climb back to 15 games over .500 as they enter the last day of a stretch of three straight weeks without a day off.

“Exactly what we needed,” Nationals Manager Dusty Baker said. “Seven strong innings.”

Gonzalez began his evening in a way not taught in most pitching textbooks — by hitting the leadoff man and walking the next. As he has all season, Gonzalez escaped, plowing through the heart of the order with that crafty left-handed stuff on which he has built a long, if occasionally laborious, Nationals career.

Entering Tuesday’s start, Gonzalez’s percentage of base runners left on base was third-highest among National League starters, 84.9 percent. Only Clayton Kershaw and Lance Lynn have kept a higher percentage of their base runners from scoring. Somehow, Gonzalez seems to get what he needs more often than not. He is 7-1 and pitching to a 2.96 ERA, his ability to escape trouble seemingly growing with age.

“A lot of times that’s when you learn it,” Baker said. “If you come into the big leagues knowing how to get out of jams, shoot, you’re going to be a big winner. Especially left-handers seem to learn it later than right-handers. That’s why they tend to stick around longer.”

Meanwhile, since Adam Eaton’s injury a month and a half ago, the Nationals have gotten what they needed from Michael A. Taylor, too. He had a walk and a hit and scored two runs Tuesday night, igniting two early rallies that gave Gonzalez a lead. Taylor is hitting .282 with an .825 on-base-plus-slugging percentage since Eaton’s injury.

Brian Goodwin provided a two-out hit to drive Taylor home in the fifth. Goodwin, like Ryan Raburn, has given the Nationals what they required in Jayson Werth’s absence — competitive at-bats, if not Werth-like production. Goodwin is hitting .253. Werth was hitting .262 at the time of his foot injury.

In that same fifth inning, the Marlins walked Bryce Harper to get to Ryan Zimmerman with two outs. Zimmerman punished them with a double. The Marlins, feigning ignorance to the definition of insanity, then walked Daniel Murphy intentionally to get to Stephen Drew.

Drew also punished them with a two-out hit that built the Nationals’ lead to 6-1. By that time, the Nationals, not usually as efficient with runners on as their manager would like, had scored six runs on five hits and four walks — so six of nine base runners had found their way home. Since Anthony Rendon left Monday night’s game with a neck injury, Drew has given the Nationals more than they could have asked for: five hits and four RBI.

Gonzalez never got that 1,500th strikeout, getting former teammate Tyler Moore to pop up to end the seventh, ending any chance he had of getting it Tuesday night. But he did continue a season of strong performances that have pulled him as near as he could hope to a goal he set before this season. Gonzalez said he wanted to be an all-star, to take the mound at Marlins Park, in his home town, where friends and family pack the stands like they did Tuesday night. As of June 20, he has done all he could to achieve that goal.

“It’s too early for me,” Gonzalez said. “. . . The way I see it, I’m just going to keep pitching until Dusty takes the ball out of my hand.”

Gonzalez probably needs to finish the first half the way he has started it to have a strong case for that all-star team. If he pitches like he did Tuesday, when he gave the Nationals everything they needed, right when they needed it, he might just find his way back home. Like getting that 1,500th strikeout at Marlins Park, an all-star appearance certainly isn’t necessary. But it certainly would be nice.