Hamilton, who had already hit a long two-run homer, had the tiebreaking RBI single in the seventh after Weaver was taken out of the game as the AL West-leading Rangers rallied for a 9-5 victory Sunday and a three-game lead over the chasing Los Angeles Angels.
"It's a lucky bunt right there," Andrus said with a big smile.
Followed by another big hit by the reigning AL MVP, who like Andrus broke out of a slump with three hits.
Hamilton had been 3 for 21 on the homestand without an RBI the past four games before his homer in the third to tie the game at 4 on the first pitch after Andrus hit an RBI triple that snapped his 3-for-32 slide.
"It was huge for us because we feed off of Josh," manager Ron Washington said. "Elvis hits the triple, then Josh comes right behind that and hits a two-run bomb to tie it up. That's exciting right there, and energizing."
Texas (76-59) had lost seven of 10 games, watching its division lead over the Angels shrink from seven games to two, before winning the finale of the series. The AL West's top two teams don't play again until a three-game series on the West Coast to end the regular season.
Los Angeles (72-61) had won seven of eight. That stretch began Aug. 18, when the Angels got a game-ending home run by Mark Trumbo to avoid being swept by Texas in a four-game series at home and falling eight games back.
Texas started the seventh against Weaver (15-7) with David Murphy's double and an RBI single by Ian Kinsler before the popped-up bunt by Andrus. The ball stopped between Weaver and catcher Jeff Mathis, who was hoping it would go foul since the speedy Andrus was already almost at first base.
"That ball just died on the line, and that contributed more than anything to that inning," Angels manager Mike Scioscia said.
Hamilton then greeted reliever Scott Downs with a single to right and Michael Young was intentionally walked to load the bases with no outs. Pinch-hitter Endy Chavez delivered a two-run single up the middle against Bobby Cassevah.
"We kept battling. We have that never-say-die mentality," Hamilton said. "That energizes us, makes us feel we can come back and win."
Weaver, pitching on three days of rest for the first time in his career, gave up seven runs and eight hits while pitching into the seventh inning. He struck out two with four walks that matched a season high.
"I don't think short rest had anything to do with it," Weaver said. "I just struggled with location."
It was Weaver's second start since signing an $85 million, five-year contract extension before the chance to become an unrestricted free agent this winter. The right-hander allowed four hits over eight scoreless innings Wednesday against the Chicago White Sox.
But unlike Ervin Santana on Saturday night, Weaver wasn't able to beat the Rangers on short rest -- even after being staked to an early 4-1 lead.
Chavez was hitting in place of Craig Gentry, who an inning earlier went into the game after right fielder Nelson Cruz strained his left hamstring running out a double. Cruz, who has had a history of hamstring problems, will be re-evaluated Monday, an off day for the Rangers.
When asked if he was optimistic about Cruz, Washington responded, "He's got a hamstring, so you know what that means -- time."
Howie Kendrick, who later homered for the fifth time in six games, had a one-out double in the first off Lewis and scored on Bobby Abreu's single. Erick Aybar had a triple and scored when Mathis singled in the second. Abreu doubled in the third and scored on a double by Trumbo's before Vernon Wells' RBI double made it 4-1.
Yorvit Torrealba also homered for Texas.
Kendrick put the Angels up 5-4 when he led off the fifth with his 14th homer. That was the AL-high 31st homer allowed by Lewis, who gave up five runs and eight hits over six innings.
The Rangers ended a stretch of games on 17 consecutive days. ... Angels right-hander Joel Pineiro, 0-3 in his five starts since the All-Star break with a demotion to the bullpen in that stretch, pitches Monday in the series opener at Seattle. ... Texas leads the season series 9-7.