Tied at 8 in the bottom of the ninth inning, Danny Santana lined a two-out single to center field off Houston closer Roberto Osuna. The Rangers were down 8-4 before rallying to win 9-8 on Friday night.
The win pulled the Rangers, who haven't made the postseason since 2016, within 1 1/2 games of the American League's second Wild Card spot. Texas is also seven games back of the first-place Astros in the AL West Division.
"This win means a lot," Santana said. "When a team is good like ours, that can happen. Everything went our way in the end."
Tim Federowicz began the Rangers' comeback with a home run off reliever Will Harris in the seventh inning. Ronald Guzman tied the game with a two-run home run off the right-field foul pole an inning later.
"It felt really good, and it felt better when it hit the pole," Guzman said. "It was amazing, especially to tie the game like that against the Astros."