NEW YORK -- Starlin Castro, Nathan Eovaldi and Anthony Swarzak helped the Yankees get back over .500 and chip away at the huge gap with AL East-leading Baltimore. New York will need a lot more wins during the rest of July to persuade management not to jettison veterans for prospects.
"Nobody in this room believes we can't do it," Swarzak said after retiring eight straight batters in relief of Eovaldi during Tuesday night's 7-1 win over the Orioles.
Castro homered in the second off Vance Worley (2-1) and hit a two-run double in the sixth against Odrisamer Despaigne. Chase Headley added a two-run homer off Mychal Givens in the eighth as the Yankees won their third straight.
Relieving Eovaldi with the bases loaded and a 3-1 lead in the sixth, Swarzak got major league home run leader Mark Trumbo to foul out to Rob Refsnyder with his back to the plate down the right-field line and Jonathan Schoop to foul out to shortstop Didi Gregorius.
New York closed within 6½ games of Baltimore and ensured it would be no more than five games back for the second AL wild card. Time is running down for the team's decision whether to buy or sell as the Aug. 1 trade deadline approaches.
"I try not to think about that. I try to focus on the game, the game in hand, and my focus is making up ground," Yankees manager Joe Girardi said.
At 47-46, the Yankees are above .500 for just the third time since mid-April. New York was 4-2 before dropping to 9-17 and later got above .500 at 31-30 and 37-36 only to regress.
"It's been frustrating this year, because we've been here so many times and we haven't been able to break through," Girardi said. "I feel like if we can get over that mark, we can build on it."
Making his first start since July 1 following three relief outings caused by a six-start winless streak, Eovaldi (8-6) won for the first time since May 29. He allowed one run and four hits in 5 1/3 innings, needing 18 pitches to get through the first but 37 for the next four.
"I don't really think about getting traded," said Eovaldi, who is eligible for free agency after the 2017 season. "I feel like it kind of takes away from what I need to do here. I started out with this team, and want to finish with this team, and I feel like we've got a really good chance of coming back and coming through."
Swarzak was assisted by Refsnyder, the rookie first baseman who caught Trumbo's foul and made a two-hop throw home that held Adam Jones at third. Nick Goody followed and struck out the side in a perfect ninth, giving the Yankees' No Runs DMC trio a rest.
"Yeah, he could be that guy," Girardi said of Swarzak.
Baltimore has lost three straight, and its AL East lead over second-place Boston was cut to one-half game. First baseman Chris Davis (stomach virus) missed his second straight game and catcher Matt Wieters (sore right foot) also was out.
Worley (2-1) made his first start since April 15 following 18 consecutive relief appearances. He allowed three runs, three hits and four walks in 4 1/3 innings.
New York's Jacoby Ellsbury grounded to shortstop in the first but his swing knocked off the glove of Caleb Joseph, who was charged with catcher's interference. Ellsbury has reached on catcher's interference nine times, the most in a season since Roberto Kelly's eight, also for the Yankees, in 1992. Ellsbury has done it 23 times in his career, the most among major leaguers since Pete Rose's 29, according to the Elias Sports Bureau.
"There's probably nine catchers that would like to see something change. It just doesn't seem fair to the defense," Orioles manager Buck Showalter said.
New York failed to score in the first inning for the 23rd consecutive game.
The Yankees open the 2017 season at Tampa Bay on April 3, according to the team's draft preliminary schedule, then go to Baltimore before their home opener, slated to be against the Rays on April 10. Some openers likely will be moved to April 2 for ESPN telecasts.
Yankees: 1B Mark Teixeira was out of the starting lineup for the third straight game because of a sore left foot.
RHP Michael Pineda (3-9) is to start for the Yankees on Wednesday and RHP Yovani Gallardo (3-1) for the Orioles. Pineda is 0-3 with a 4.46 ERA in six starts since beating the Los Angeles Angels on June 7.
Freddie Freeman has been raking this postseason
Relive some of Freddie Freeman's best moments at the plate this postseason as the Braves get set to face the Astros in the World Series.
World Series 2021: Freddie Freeman's Fall Classic moment with the Atlanta Braves has finally arrived
The face of the Braves has also been the picture of consistency. Now, with free agency raising the possibility that this will be his first and last World Series with Atlanta, the reigning NL MVP brings his steady habits to the game's biggest stage.
World Series 2021: Atlanta Braves or Houston Astros? Who will win MVP? Our expert Fall Classic predictions
From the players and stories we'll be talking about to who will win it all, we make our Fall Classic picks.
World Series 2021: Jeff Passan answers 20 questions as Atlanta Braves and Houston Astros meet
As an unexpected Fall Classic matchup begins, here's what will decide this October's last team standing.
2021 MLB playoffs: Schedules, postseason bracket, analysis and updates
All the latest information about the teams, storylines and highlights of the 2021 MLB postseason, from the start of October through the World Series.
World Series set to begin with Houston hosting Atlanta in Game 1
Atlanta Braves (88-73, first in the NL East) vs. Houston Astros (95-67, first in the AL West)