Trout hit his 25th homer of the season, a two-run shot off Jeremy Hellickson (0-1) during a three-run first that put the Angels up 3-0.
"We're getting our timing back," Trout said. "A good win tonight for sure."
Los Angeles went ahead 4-1 on Hamilton's solo homer in the third. The slugger was hit by Jeff Beliveau's pitch in the seventh inning and has a bruised left middle finger.
Angels manager Mike Scioscia said Hamilton's finger was a little sore and isn't sure if he will play Saturday.
After Tampa Bay loaded the bases with no outs in the ninth against Huston Street, the closer got his fifth save since being acquired from San Diego on July 18 by striking out Desmond Jennings and Ben Zobrist, and getting Matt Joyce on a pop fly. Zobrist had a potential extra-base hit go foul down the right field line.
"You know it's a matter of time before he starts making pitches," Scioscia said. "That's a tough group to go through. He got it done."
This was the Rays' first game since trading ace David Price to Detroit as part of a three-team deal Thursday. Tampa Bay received Tigers left-hander Drew Smyly and two minor leaguers.
"There are no moral victories," Tampa Bay manager Joe Maddon said. "That's a game we should not have permitted to get away."
Tampa Bay got within 4-3 in the fifth on Evan Longoria's infield single. A second run scored on a throwing error by third baseman David Freese. Longoria was thrown out attempting to advance to second after colliding with first base umpire Larry Vanover.
The Angels took a 5-3 lead on a sixth-inning run-scoring double by Chris Iannetta.
Hellickson gave up four runs and six hits in 4 2/3 innings. The right-hander, coming back from right elbow surgery in January, has gone less than five innings in all three of his starts this season.
Angels: Tyler Skaggs was placed on the 15-day disabled list with a left forearm strain. Scioscia says the left-hander might miss "a little bit of time."
Rays: Right fielder Wil Myers, out since May 31 with a broken right wrist, took batting practice in an indoor cage for the first time. Catcher Ryan Hanigan, out with a strained left oblique, will join Single-A Charlotte on Saturday.
Angels: Left-hander C.J. Wilson (8-6) is scheduled to return from the disabled list to start Saturday night. He went on the DL July 10 with a sprained right ankle
Rays: Right-hander Chris Archer (8-6) is looking Saturday night to extend a stretch of going six or more innings in 10 of 12 starts.
The Angels arrived at their hotel just after 4 a.m. following a 1-0, 13-inning win Thursday night at Baltimore that took 4:33. Friday's game lasted 3:39.
GUMBY MISSES OUT
The Rays are giving away a Maddon "Mr. Potato Head" on Saturday. Maddon is hopeful that there will be another promotion featuring his favorite character "Gumby" in the future.
"Everybody realizes it's part of the gig. People get traded. We're definitely going to miss him." Joyce on the Price trade.
20,969 (61.5% full) - % is based on regular season capacity
Home Plate - Angel Hernandez, First Base - Larry Vanover, Second Base - Vic Carapazza, Third Base - Gabe Morales
Mike Trout has slugged .738 in at-bats ending in an offspeed pitch this season, which, if it stands, would be the highest mark of any qualified hitter in a single season over the last six years. Since the start of last season, Jeremy Hellickson has thrown the second-highest percentage of changeups among pitchers with at least 20 starts (30.6 percent).
Mike Trout's first inning home run was his 25th of the season. He's only the fourth player in MLB history with three 25-homer seasons through his age-22 season. The other three are all in the Hall of Fame.