After Kazmir punched out leadoff hitter Brandon Guyer, Desmond Jennings grounded out into the shift, right to Jose Altuve who was playing just behind second base.
Three-hole hitter Evan Longoria then exploited the shift, poking Kazmir's 2-1 offering through the right side for a seeing-eye single. Kazmir then lost Logan Forsythe on a full-count pitch, walking him to bring up Asdrubal Cabrera.
Cabrera sent a sinking liner toward Carlos Gomez in center. Gomez appeared to misjudge the ball, taking a step back before scurrying in and letting the ball bounce at his feet for an RBI single to score Longoria.
"[Gomez's] first step might have been back a little bit," said Astros manager A.J. Hinch. "Cabrera takes a full swing and it was hard to tell. He played pretty deep, and Gomey tends to play a little bit deep. It looked like he had a little bit of a pause, delay. I'm not sure how close he came to it."
Then, on a two-strike count, Beckham followed with the home run.
It was a common theme of the evening for Kazmir, who surrendered five of his nine hits in two-strike counts.
"He just didn't make pitches at the end of the at-bats," Hinch said. "I think a lot of those pitches were out over the plate, and they did a good job of working the ball over the middle. They shot a lot of balls up the middle against really all of our pitching tonight and had really sound approach with two strikes."
After earning American League Pitcher of the Month honors in July, Kazmir has lost all three August starts, allowing a combined nine earned runs and not lasting longer than 5 2/3 innings in any of the outings.
"I really don't feel like it's off, I feel like it's a matter of being completely sharp," Kazmir said. "I feel great, my fastball feels like it's where it needs to be, it's just a matter of executing. That's something when it comes to crucial times, I just didn't do it."
Chandler Rome is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.