Davis led off the ninth inning with his major league-leading 41st home run and the Orioles beat the New York Yankees 2-1 Tuesday night for just their fourth win in 19 games.
"I thought we did a good job hanging in there," Davis said.
Baltimore has faded from contention in the wild-card race, which the Yankees lead. But they dropped 1 1/2 games behind AL East-leading Toronto.
Beyond that, the Yankees managed a mere five singles.
"We just didn't come up with the big hit tonight," manager Joe Girardi said.
Davis picked on a 2-0 pitch and homered for the sixth time in seven games, lofting an opposite-field drive into the seats in left. He was the first batter Chasen Shreve (6-2) faced after Tanaka pitched eight innings.
Davis, like Rodriguez, is enjoying a resurgent season. The Orioles' slugger led the majors with 53 home runs in 2013, but hit just 26 last year and drew a drug suspension down the stretch.
"Solid in a time of need," manager Buck Showalter said.
The Orioles ended a three-game skid overall and a five-game drought at Yankee Stadium despite star outfielder Adam Jones sitting out with a sore shoulder. New York lost for the third time in 11 games.
Rodriguez hit his 684th career homer leading off the sixth, making it 1-all and chasing Baltimore starter Kevin Gausman.
The 40-year-old Rodriguez hadn't hit the 30-homer mark since 2010. He didn't play last year while serving a season-long drug suspension.
The homer was A-Rod's fourth in five games and boosted his career hit total to 3,056, moving him past Rickey Henderson for 22nd place.
Gausman did get even with Yankees rookie Greg Bird, striking him out in both at-bats. Bird was Gausman's catcher in high school in Aurora, Colorado -- the last time they faced each other, Bird homered in an intrasquad game.
The two good friends went out to dinner Monday night. Gausman said he kidded that he'd strike out Bird every time, while Bird said he'd hit a home run.
"It was pretty cool," Gausman said.
Echoed Bird: "It's cool, I guess, seeing someone you grew up with out there and competing against him. It was fun."
Tanaka had given up just one scratch single before Ryan Flaherty led off the Orioles sixth by lining a home run. After a two-out single, Davis hustled for an infield hit, only to be called out on a replay review.
Third baseman Brendan Ryan cut off a potential Baltimore burst in the seventh, diving to his left to begin a nifty double play.
The crowd of 30,785 was the second-smallest in seven seasons at the new Yankee Stadium. The lowest was 30,055 on April 29 against the Rays, STATS said.
Orioles: RHP Miguel Gonzalez (9-11, 4.85 ERA) is doing well in his recovery from shoulder tendinitis, Showalter said. Showalter said it would be good for Gonzalez and the team to have him pitch again this season.
Yankees: OF Brett Gardner got a shot in his jammed shoulder. He hurt himself running into a wall over the weekend and hasn't started the last two games.
Yankees: CC Sabathia (4-9, 5.27) is set to come off the disabled list and start Wednesday night. He's been out with inflammation in his right knee. The big lefty is 18-7 lifetime vs. the O's.
Ellis expected to start for the Orioles against the Rangers
Texas Rangers (56-98, fifth in the AL West) vs. Baltimore Orioles (49-105, fifth in the AL East)
Sampson scheduled to start for Chicago against St. Louis
St. Louis Cardinals (85-69, second in the NL Central) vs. Chicago Cubs (67-87, fourth in the NL Central)
Suarez scheduled to start as Philadelphia hosts Pittsburgh
Pittsburgh Pirates (57-96, fifth in the NL Central) vs. Philadelphia Phillies (80-74, second in the NL East)
Fedde scheduled to start for Nationals at Reds
Washington Nationals (64-90, fifth in the NL East) vs. Cincinnati Reds (79-75, third in the NL Central)
Hill scheduled to start for Mets at Brewers
New York Mets (73-80, third in the NL East) vs. Milwaukee Brewers (92-62, first in the NL Central)
Gallen expected to start as Arizona hosts Los Angeles
Los Angeles Dodgers (99-55, second in the NL West) vs. Arizona Diamondbacks (49-105, fifth in the NL West)