When Christian Vázquez connected on a fastball from Houston Astros closer Josh Hader in the ninth inning Sunday, he liked how the ball felt coming off his bat, but he wasn't sure if he hit it too high.

Vázquez carried his bat with him as he hopped up the first-base line with anticipation. Once the ball landed in the seats for a walk-off home run, he flung his bat 15 feet in the air to celebrate a 3-2 Twins victory.

Prince's "Let's Go Crazy" blared through the Target Field speakers. Vázquez did a jumping high-five with third base coach Tommy Watkins, then threw his helmet skyward before teammates showered him with water and bubble gum at home plate.

After Vázquez collected himself in the dugout, hugging a few more teammates, he let out a yell as he walked onto the field and raised his arms in the air. The Twins have homered in a team-record 25 consecutive games.

"You don't want to walk me there, the nine-hole hitter of the lineup," said Vázquez, who homered on the seventh pitch of his at-bat. "I knew it would be a fastball, so I can't miss it."

There's no hiding it's been a rough offensive season for Vázquez. He's looking more like a guy who isn't searching for answers. He drove in all three Twins runs. Maybe there was some relief in his euphoric bat toss.

It was the fourth homer Hader has given up in his past six appearances.

"The game is so hard, and you never can stop working," said Vázquez, who has three career walk-off homers. "My swing feels very good. I can drive the ball to left-center with damage. I had a couple months of struggling, the first two, and I feel like right now this is the old Vázquez everybody knows."

Simeon Woods Richardson, who grew up outside of Houston, gave up three hits and two runs in his second start against the Astros this season. He retired his last 13 batters after a two-run and 32-pitch second inning.

The 23-year-old rookie pitcher credited Vázquez for their game plan against an Astros lineup that averaged 6.75 runs in their previous 16 games.

"[Vázquez] sees things I don't see," Woods Richardson said. "Saying, 'You got this. Just trust me a little bit and we're going to be all right.' You can get within your own head, and he kind of brings you out of it."

Sign up for our Twins Update newsletter

BOXSCORE: Twins 3, Houston 2

The second inning snowballed a bit on Woods Richardson after he issued back-to-back walks to load the bases with one out. A sacrifice fly and an RBI single from Jose Altuve gave the Astros an early 2-0 lead.

Woods Richardson's pitches had a little too much cut movement, Vázquez said, requiring an adjustment. The Astros didn't have another baserunner until the eighth inning.

"Their offense is a very difficult offense to go up against because pitches that get you through innings against other teams do not get you through their lineup," Twins manager Rocco Baldelli said. "They put a lot of balls in play and they don't strike out."

The Twins, who have won 10 of their past 14 games, tied the score in the fourth inning despite poor baserunning. Brooks Lee reached on a misplay in the infield, and Matt Wallner followed with a line drive to right field — the hardest-hit ball of his career at 116.8 mph — to put runners on the corners.

Vázquez, the next batter, hit a ground ball to third base. Lee initially stayed at third, then he darted for the plate when Alex Bregman's throw went to second base. Altuve, after recording the out at second, fired a one-hop throw to the plate that had Lee beat by four or five steps, but Salazar never secured the ball and Lee slid around him for a run.

There was some initial confusion about whether Lee touched the plate, so Vázquez took a few steps toward second base, and he was thrown out attempting to dive back to first.

As bad as the Twins looked running the bases — Jose Miranda was caught stealing in the seventh inning, too — they were excellent defensively. Wallner made a diving catch in the fifth inning. In the seventh inning, Lee snuffed out a Mauricio Dubón drag bunt attempt with a strong throw on the run, and Manuel Margot made a sliding grab in left field on back-to-back plays.