Gio Gonzalez makes his first start since returning from the disabled list with mixed results, striking out six over five innings and 93 pitches of work while surrendering four earned runs. (Jonathan Newton/The Washington Post)

In the second inning Wednesday night, sprinting from first base and trying to steal second, Jayson Werth knew he would be out. His instincts pushed him to try to something he had attempted before, never successfully. He slid short of the base, spraying dirt as he stopped himself with the spikes on his left foot. He avoided a tag, hopped to the base, spread his arms and yelled, “Safe!”

“I gave them the old Whoop-Dee-Do,” Werth said.

Werth’s balletic, see-it-to-believe-it slide led directly to a run, and in the Washington Nationals’ 6-5 victory over the Houston Astros, each score was deeply meaningful. Werth’s base running would also key a pivotal, three-run rally in the seventh inning that led to the Nationals’ two-game sweep.

Gio Gonzalez returned from the disabled list and gave up four runs, all scoring in one implosive frame, over five innings. Nate McLouth’s sacrifice fly in the seventh sealed the Nationals’ comeback. But it started with Werth, who twice showed why he is regarded as one of the best base runners in baseball.

“There’s more than one way to win a game,” Werth said. “You can do it with your glove. You can do it with your bat. You can do it with your legs. I’m not nearly as fast as I used to be. I’m still as crafty. I didn’t get any hits tonight, but I feel like I did a lot to help my team win.”

The Braves’ loss Wednesday afternoon ensured the Nationals remained in first place as they welcome their rivals to Washington on Thursday for a pivotal four-game series. With their victory at night, the Nationals surged ahead by 11 / 2 games, their largest lead since April 10. Starting Thursday night, the Nationals have the chance to create meaningful separation between themselves and the reigning National League East champions.

“Long time coming, I think,” Werth said. “If we want to win the division, we’re going to have to beat them. It’s early, but anytime you play your division rival, it’s important.”

Wednesday night, Werth’s alert, acrobatic base running provided a counterbalance to myriad mistakes the Nationals committed, the kind of miscues that the Braves may not allow them to overcome. Gonzalez yielded three walks and hit another batter. Denard Span drove in a crucial run in the sixth inning with a liner to the right field wall, only to be thrown out at third to the end the inning with Anthony Rendon on deck. Ross Detwiler allowed the Astros’ fifth run in the seventh inning when he fired a wild pitch past Sandy Leon and was late to cover the plate.

The Nationals entered the bottom of the seventh down, 5-3. Rendon blasted the first pitch Josh Zeid threw him to the second-to-last row of red seats, slicing the lead to one. Werth drew a walk, and Astros Manager Bo Porter summoned left-hander Darin Downs to face Adam LaRoche.

LaRoche hit a two-strike pitch with the handle of his bat, muscling it into center field. Werth’s feet pitter-pattered for a beat. He processed the placement of the center fielder, the speed of the ball and the quickness of the infielders, and he knew the ball would get down in shallow center field.

“He got a good read on the ball initially, and he never thought twice about it,” Manager Matt Williams said. “That set us up, and it’s an important part of our game that we need to do.”

When Ryan Zimmerman grounded a fielder’s choice to second base, Werth scored the tying run rather than only advancing to third base. Ian Desmond continued the rally when he laced a double to left field off Kyle Farnsworth.

The Astros intentionally walked Danny Espinosa, to the apparent ire of Farnsworth, and Williams pinch hit McLouth for catcher Leon. McLouth lofted a first-pitch fastball deep to left, enabling Zimmerman to trot home with the go-ahead run.

“In that situation, there’s a lot of ways you can score that runner,” McLouth said. “I didn’t want to get behind there, having sat around all game.”

In his first start since left shoulder inflammation shelved him May 17, Gonzalez flashed his best velocity, touching 93 mph, and struck out six. But he also allowed three walks and put the leadoff man on base in every inning. Williams wanted Gonzalez to jump ahead in counts, and Gonzalez threw first-pitch strikes to just 12 of 22 hitters.

Gonzalez cruised into the fourth with a 2-0 lead. The first five Astros hitters of the fourth inning would reach base, and four of them scored. Gonzalez issued an 11-pitch walk to Jose Altuve and hit George Springer with a 91-mph fastball to start the inning. Three line drives and a sac fly later, the Astros had seized a 4-2 lead.

“Walking a guy and hitting a guy will definitely start something,” Gonzalez said. “It’s something to learn from. Dust the cobwebs off a little bit and get back at it. It’s definitely a work in progress.”

Before Gonzalez’s unraveling in the fourth, the Nationals had taken control with aggression on the bases, including Werth’s remarkable play. First base coach Tony Tarasco told Span he could take advantage of Houston starter Scott Feldman’s deliberate motion, and the Nationals stole five bases in the first three innings. Span led off with a walk and promptly swiped second. He would score on LaRoche’s sacrifice fly, giving the Nationals a 1-0 lead.

The most mesmerizing stolen base, though, came with one out in the third. Werth bolted to second base, and as he neared the base, he could see catcher Jason Castro’s throw would beat him. Kneeling on the bag, Altuve snared the ball. Werth slid on his left leg. Altuve swiped his glove over the front of the base.

“Instincts,” Werth said. “There’s no thought to it. It just happened.”

In mid-slide, Werth planted his left foot in the ground. Dirt flew. He stopped short of Altuve’s tag and allowed his momentum to propel himself into the air, short. Altuve lunged for Werth, but he kicked his left leg back, a ballerina in flight, and stepped on the side of the base with his right foot. He landed with his arms outstretched.

“I even called myself safe,” Werth said.

Werth’s steal made an impact beyond the athletic grace it required. Desmond belted a two-out, RBI single to center field. The Nationals led, 2-0.

“We face a really difficult team over the next four games,” Williams said. “I think it was really important to win this one tonight. And we need to look to tomorrow now.”