On Trout's 26th birthday, the Los Angeles Angels center fielder had two hits to give him 1,001 in his career, including his 23rd home run of the season.
However, Dylan Bundy pitched seven strong innings, and Manny Machado hit a tiebreaking grand slam in the seventh, leading the Orioles to a 6-2 win Monday night.
The victory was the 14th in 21 games for the Orioles, who have moved from also-ran in the American League to within 1 1/2 games of the second wild-card spot, currently shared by the Kansas City Royals and Tampa Bay Rays.
Baltimore (56-56) also reached .500 for the first time since June 29. Los Angeles (55-58) took its third loss in a row.
Bundy (11-8) allowed five hits and no walks while striking out a career-high 10.
Machado broke open a 2-2 game with a 423-foot grand slam off JC Ramirez (10-10) with two out in the seventh. It was his 21st home run of the season and the fourth grand slam of his career.
Bundy had every Angel but Trout and Andrelton Simmons off balance with his slider. The pair accounted for four of the Angels' five hits.
"Dylan has a fastball that gets to where it needs to go," manager Buck Showalter said. "He had (105) pitches tonight, and he really didn't look like someone who threw that many."
Bundy said, "I wanted to show the slider early and stick with it. It was a good game plan. I'm not sure why I had as many strikeouts, other than they haven't seen me since last year, and that was in relief and before I added the slider."
Showalter said he didn't know the Orioles were back at .500.
"Now we have to get over .500," he said. "There's still a lot of baseball yet. We've been playing well."
The Monday game was Baltimore's first on a 10-game West Coast swing that includes two more against the Angels, four at Oakland and three at Seattle.
"It's always good to get the first game of a big road trip," Bundy said.
Trout tied the game 2-2 with his sixth-inning home run, pulling a 3-2 Bundy pitch down the left field line and off the left field foul pole. It was the fourth time Trout has homered on his birthday, doing it as well in 2012, 2013 and 2015. He also went deep for the fourth time in the past six games.
The O's got to Ramirez in the seventh. Seth Smith and Welington Castillo singled with one out. Ramirez struck out Joey Rickard for the second out and had Adam Jones in a 0-2 hole when his pitch ran in and struck Jones' left hip to load the bases.
Machado followed by clubbing a 1-0 pitch into the left field bleachers, a 423-foot shot.
The All-Star third baseman has had a frustrating year, batting .258 with a .318 on-base percentage. However, he is hitting .411 with three home runs and 12 RBIs in his past eight games.
"It's tough emotionally for a player like Manny when he's hitting the ball hard but it's not falling for him," Showalter said. "The best thing is that he hasn't let it snowball on him. He's staying confident."
Ramirez (10-10) allowed eight hits, six runs and two walks in seven innings.
"He had a walk that hurt him in the fourth," manager Mike Scioscia said of Ramirez. "He had Jones 0-2 when the ball ran in. We were a pitch away from getting out of the inning."
Trout hit a fourth-inning double to make him one of just four players to have 1,000 hits, 500 runs and 500 walks by his age or younger, joining Mickey Mantle, Jimmie Foxx and Mel Ott. It also made him the 10th player in AL history with 1,000 hits by his age, a list that includes six Hall of Famers: Ty Cobb, Al Kaline, Robin Yount, Foxx, Mantle and Ken Griffey Jr.
Trout already was the first player with 150 home runs and 150 stolen bases before his 26th birthday.
NOTES: Baltimore 1B Mark Trumbo (rib cage strain) is expected to be activated Wednesday, the first day he is eligible to come off the disabled list. ... Orioles SS Tim Beckham was named AL Player of the Week after hitting .538 with seven extra-base hits, six runs and six RBIs in six games. ... Angels LF Cameron Maybin was activated from the disabled list and went 1-for-4 from the leadoff spot. He missed 15 games with a left MCL sprain. ... Angels LHP Jose Alvarez was recalled from Triple-A Salt Lake for his third stint with the team. ... The Angels designated OF Shane Robinson for assignment and optioned LHP Eduardo Paredes to Salt Lake. ... LF Ramon Flores was outrighted to Salt Lake. ... Los Angeles RHP Matt Shoemaker will have season-ending surgery Tuesday to treat a radial nerve compression in his right forearm.