New York also snapped the Orioles' four-game winning streak to start the season. The Yankees (2-4) now head back to New York for their home opener Monday against the Tampa Bay Rays.
Aaron Judge hit a solo homer off Mychal Givens that tied the game 3-3 in the eighth. O'Day (0-1) walked the opening two batters to start the ninth before Starlin Castro lined a single for a 4-3 lead. O'Day issued another walk to load the bases and Judge provided a two-run cushion with a ground out. Austin Romine followed with a sacrifice fly and a throwing error by Jonathan Schoop allowed the fourth run to score.
Dellin Betances (1-1) picked up the win with a perfect eighth.
Baltimore left-hander Wade Miley, who came off the DL from flu-like symptoms, had seven walks, but didn't allow a hit until Aaron Hicks roped a single in the fifth. Miley gave up just one hit over five scoreless innings with five strikeouts and 100 pitches.
The Orioles took a 2-0 lead in the second on a fielder's choice by Trey Mancini and single by J.J. Hardy off CC Sabathia. Baltimore loaded the bases with one out the following inning, but Sabathia got out of the inning by getting Mancini to hit into a 6-4-3 double play.
A single by Mark Trumbo gave the Orioles a 3-0 lead in the fifth. Sabathia allowed three runs (two earned) with three strikeouts and four walks over six innings. He became the first Yankees starter to complete six innings this season.
The Yankees pulled to within 3-2 on a two-out triple by Ronald Torreyes off Tyler Wilson in the sixth. Baltimore's bullpen had not allowed a run in 16 2/3 innings prior to that hit.
NOTES: Yankees C Kyle Higashioka was recalled from Triple-A Scranton/Wilkes-Barre to take the spot of C Gary Sanchez, who was placed on the 10-day DL with a right biceps strain. ... New York 1B Greg Bird said Sunday that his sore right foot was feeling better. However, he was bothered by a stomach bug and was out of the lineup again. ... Orioles OF Joey Rickard was placed on the 10-day DL with a sprained left middle finger.