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.
Here's what happened last time Buffalo hosted a big league baseball game ... 135 years ago
Fewer than a dozen fans in attendance. Strange new rules. Tuesday's Blue Jays home opener? Nope. This is what it looked like when Buffalo had a National League team -- in 1885.
Astros, early in busy stretch, eye another win over Giants
Following a ragged road trip that resulted in six losses over nine games, the Houston Astros opened an eight-game homestand Monday while kicking off a grueling stretch of the schedule.
A's could be minus Laureano vs. Angels
The Oakland A's could be without Ramon Laureano for their Tuesday game against the Los Angeles Angels in Anaheim, Calif., if, as expected, Major League Baseball announces a suspension for the center fielder.
Richards to face Stripling in latest Padres-Dodgers tussle
It might be a shorter season, but the Los Angeles Dodgers continue to see they will have a long duel ahead with the San Diego Padres.
Rockies' Freeland eager to continue resurgence vs. D-backs
Kyle Freeland went through a nightmare of a season in 2018, but the Colorado Rockies left-hander salvaged something out of it, and it's paying off.
Mariners hope to keep bats alive against Rangers
The Seattle Mariners look to continue their sudden power surge when they square off against the homestanding Texas Rangers on Tuesday in the middle contest of a three-game series at Globe Life Field in Arlington, Texas.