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.
Fantasy baseball daily notes: Pitcher and hitter rankings for Tuesday's games
Prepare your fantasy baseball lineups confidently with our daily preview, including pitcher projections, hitter matchup ratings and more.
A's top prospect Luzardo to make first start vs. Rangers
The Texas Rangers move to the east side of the San Francisco Bay looking for better results when they open a three-game series against the host Oakland Athletics on Tuesday night.
Our not-as-early-as-you-think MLB hot takes and bold predictions
From highly unexpected playoff contenders to unthinkably good (and bad) performances, it isn't too soon to draw conclusions in a 60-game season.
How long every MLB team projects to be in the playoff race in 2020
From the early exits to the clubs that will be in the running at season's end, where does your team land on baseball's contention calendar?
Rested (or rusty?) Jays set to resume play in Atlanta
The Toronto Blue Jays will be well-rested when they pull into Atlanta on Tuesday for the opener of a three-game interleague series against the Braves.
Soto set to return for Nats in series opener vs. Mets
The Washington Nationals have waited five days to return to action. Juan Soto has waited a lot longer than that.