It's the fourth consecutive win for the Astros (12-14), and their sixth in eight games.
"We've been talking about getting over the hump, especially in those one-run games," said manager Brad Mills. "That's exactly what these guys have started to do. It started in that Mets series and it carried over into tonight."
This win was particularly impressive considering the early offensive fireworks came against Kyle Lohse, the St. Louis starter who entered with a 4-0 record and a 1.62 ERA.
But the Astros got to him for five runs, three earned, in the first two innings, giving them a lead they never relinquished.
"I think guys had real good at-bats," said Mills. "Altuve's homer was obviously huge, but getting long, deep at-bats was very big."
The Astros worked Lohse's pitch count to 99 in just five innings, forcing him into an early exit.
Lohse also didn't get much help from his defense, and Altuve and the Astros made the Cardinals pay. Prior to Altuve's one-out blast, Jordan Schafer hit a sharp ground ball to St. Louis first baseman Allen Craig that could've been an inning-ending double play.
But Craig sailed his throw to second base into left field, leaving both runners safe. That set the table for Altuve, who smashed an 0-1 fastball from Lohse to the back of the left-field Crawford Boxes for his second homer of the season. That put the Astros in front, 5-2.
"I went out today with a plan, and I was expecting that pitch," said Altuve. "I knew I could hit it really good."
"I tried to go sinker in and it was in off the corner and just up," said Lohse. "He did a good job of hitting there."
Altuve went 2-of-5 to raise his team-best batting average to .360. But his finest play may have come on defense in the ninth.
Down by a run against Houston closer Brett Myers, Rafael Furcal led off with a single, setting the table for the heart of the St. Louis lineup.
But when Jon Jay hit what looked like a popup to Altuve at second base, Altuve let it bounce, played it off the short hop and started a 4-6-3 double play. Myers then struck out Matt Holliday to end the game, picking up his seventh save.
"You can't say enough about that play," said Mills. "A lot of people won't understand how great a play that was. To be able to get that short hop and turn it into a double play, that was absolutely outstanding.
Starting pitcher Lucas Harrell (2-2) did just enough to pick up his second win of the year, giving up four runs (three earned) on seven hits in 5 1/3 innings.
It looked ragged in the early going, especially when the first two Cardinals runs scored courtesy of a throwing error from third baseman Chris Johnson and a two-out balk. But Harrell settled in and allowed no runs after the third, preserving the narrow Houston lead.
"I feel like I settled down as the game went on," said Harrell. "In the third, I got the wind knocked out of me when I dove for a ball. I should've taken more time.
"It was a big team win. Any time you can knock off the top team in the division and start off the series with a win, it's huge."
The Astros' bullpen pitched 3 2/3 innings of scoreless relief, with Wesley Wright, Wilton Lopez and Fernando Rodriguez preceding Myers.
Lopez was particularly impressive, entering with none out and a runner on first in the seventh inning against the meat of the St. Louis order. But Lopez struck out Holliday and Craig swinging before forcing a weak groundout from David Freese to end the threat.
Schafer, who earlier reached on two errors, walked in the eighth inning to reach base for the 25th straight game to open a season, which tied him with Denis Menke (1969) for the club record.
The Astros weren't able to drive Schafer in that time, but the bullpen was able to close things out.
"I think from Day 1, we thought we had good arms that could compete with anyone," said Wright.
"We're not really surprised. We just thought we could keep our heads down, keep working hard and we'll be right in the thick of things."