The Yankees kept pace with Toronto and Boston atop the AL wild-card standings as all three teams won. New York improved to 82-64 and clinched its 29th consecutive winning season, the second-longest streak in MLB history, behind its own 39-year run from 1926-64.
"That's a situation you want to be in," Gardner said. "You want to be up there with the game on the line. I feel like I've been having pretty good at-bats recently and seeing the ball well. "
Austin Hays homered twice for the Orioles, including a two-out, two-run drive in the eighth off Chad Green for a 3-2 lead. The homer came soon after second baseman Gleyber Torres knocked down a hard liner and instead of throwing to second to get the lead runner, tossed to first to put out Cedric Mullins.
"Obviously a hard hit ball and a good on of stopping it," Yankees manager Aaron Boone said. "It was a play where he should have gone to second if he had the time, but he wound up taking the out at first."
Orioles reliever Tyler Wells (2-3) walked Luke Voit to begin the ninth and Torres followed with a single. Pinch-runner Tyler Wade and Torres pulled off a double steal with one out as it began to rain.
Gardner followed with a single to center that scored both runs, much to the delight of their fans that flocked to Camden Yards.
"That ‘s the guy you want up," Wade said about Gardner. "He’s been in those situations all the time for 10 or 11 years. His heart beats really slow and he knows exactly what he needs to do and he came through tonight."
Wandy Peralta (5-3) earned the win and Aroldis Chapman got his 27th save.
Gio Urshela launched a two-run homer into the left-center bleachers in the third. Urshela took over as the full-time shortstop this week for the error-prone Torres and had a diving catch off a hard liner by Austin Wynns for the final out in the fifth.
Mullins took a two-run homer away from Gary Sanchez in the second with a leaping grab over the center-field fence. Orioles starter John Means pointed to Mullins in celebration and Sanchez walked back to the dugout in disbelief.
Means had another effective outing and allowed two runs and four hits with four strikeouts and two walks in 5 2/3 innings. It was the fifth time this season the Orioles failed to score a run when Means was on the mound.
Hays homered in the sixth and added his 20th of the season in the eighth.
"That was a tough one for us," Hays said. "We were able to force the issue and get the lead but unfortunately we were not able to get the win tonight."
As the Orioles grounds crew was poised to roll out the tarp because of an impending rainstorm in the ninth, acting crew chief and third base umpire Tim Timmons waved them off the field with two strikes to Gardner. More than a dozen grounds crew members scurried down the line in right and off the field. It began to rain about five minutes later, but the cover was never placed over the diamond. Gardner fouled off three more pitches before delivering the go-ahead hit.
"I didn’t ‘eject’ the grounds crew," Timmons said in a text to The Associated Press. "I just didn’t want all of them behind the tarp, especially with the infield in."
Yankees: RHP Domingo Germán (right shoulder inflammation) did not have any issues after pitching for Triple-A Scranton/Wilkes-Barre on Tuesday and could rejoin the team as a reliever after one more rehab outing. German has gone 4-5 with a 4.45 ERA over 21 games (18 starts) this season.
Orioles: DH Trey Mancini left the game Tuesday night with soreness in his right oblique/abdomen and was initially back in the lineup before being scratched. … C Pedro Severino still has discomfort in his upper leg/groin area and is day-to-day.
Yankees: LHP John Montgomery (5-6, 3.71 ERA) picked up the win against Baltimore with six scoreless innings on April 5, but he didn’t last past the fifth inning in his next two starts against them and did not get a decision.
Orioles: LHP Chris Ellis (1-0, 2.08 ERA) has pitched well since being claimed off waivers from Tampa Bay in August, allowing five runs with 11 strikeouts over 17 2/3 innings.