Corey Julks pinch-hit for the designated hitter in the third inning.
An all-star last year, Alvarez leads the majors with 55 RBI this year.
He is slashing .274/.386/.582 with 17 home runs this season.
Alvarez said he first felt sore when hitting in the cage before the game, and felt pain again when he swung and missed at the first two pitches in his lone at bat.
“We’ll evaluate him tomorrow,” Astros manager Dusty Baker said after the 3-2 loss. “That’s a tough blow right there. We’ve just got to regroup and try to figure out how we’re going to win some ballgames and get through this.”
— With files from AP