The Astros broke the game open with three runs in the ninth. Meyers tripled and scored on Jose Altuve's third hit, a single to left. Alvarez walked with the bases full for an RBI and Altuve came home on a fielder's choice.
With the win, the Astros are now 1 1/2 games ahead of the Texas Rangers, who were swept in their three-game series with the Cleveland Guardians, in the American League West.
Valdez (12-10) yielded five hits and fanned five.
Royals starter Jordan Lyles (4-17) was tagged for four runs on six hits in six innings. The right-hander struck out six.
In the second inning, the Royals broke on top on Drew Waters' sacrifice fly to right field. Nick Loftin singled with one out, and a controversial play created some confusion.
Logan Porter grounded back to Valdez, who couldn't make the play. The ball deflected toward the third base line. Valdez chased and made an off-balance throw toward first. To retrieve the wild toss, Astros first baseman Jose Abreu flipped his glove and knocked down the ball.
The umpires consulted and awarded Porter second base, and Loftin stayed at third. Errors were charged to Valdez and Abreu.
The Astros responded with two runs in the third inning. Altuve doubled to open the inning, and Lyles put himself in a bind by hitting Alex Bregman and Alvarez with pitches, loading the bases. Abreu lifted a sacrifice fly, and Chas McCormick, who had three hits, slapped a two-out, RBI single, giving Houston a 2-1 advantage.
Meyers put Houston ahead 3-1 in the fourth inning with a solo home run, his 10th of the year. In the fifth inning, it was Alvarez's turn, as the slugger connected on his 28th.
The Astros maintained their 4-1 lead in the fifth inning when left fielder Michael Brantley threw Porter out at the plate on Maikel Garcia's two-out single.
—Field Level Media