Chris Davis drove in two runs for the wild-card Orioles, who used the same formula that got them into the postseason for the first time in 15 years: a magnificent bullpen and an ability to win tight games. Baltimore was 29-9 in one-run decisions during the regular season and 74-0 when leading after seven innings.
Major league saves leader Jim Johnson, roughed up for five runs in a Game 1 loss, came back to pitch a perfect ninth to close it out.
The rest of the best-of-five series is at Yankee Stadium, beginning with Game 3 on Wednesday. Hiroki Kuroda will start for AL East champion New York against rookie Miguel Gonzalez.
"It means everything," Davis said of the win. "You definitely don't want to go into New York in a five-game series down two games. This is big having the day off tomorrow, hopefully building some momentum, and we can take that into New York."
Chen gave up two runs, one earned, and eight hits over 61⁄3 innings. The Taiwan native, who pitched previously in Japan, was 1-2 with a 5.25 ERA in four outings against New York this season, including two in September in which he yielded a total of 11 runs over 111⁄3 innings.
"I thought he pitched inside pretty effectively tonight to some of our right-handed hitters," Yankees manager Joe Girardi said. "It seemed like Baltimore and us have kind of gone back and forth all year and that's what we did here."
The teams split the season series 9-9.
Chen left with a 3-2 lead, and the bullpen made it stand up. Johnson retired Derek Jeter and Ichiro Suzuki on grounders and struck out Alex Rodriguez to end it in front of a rollicking crowd at Camden Yards.
Much earlier, Suzuki's deft dancing at the plate put the Yankees ahead.
Pettitte, whose 19 wins and 43 starts are the most in postseason history, allowed three runs and seven hits in seven-plus innings.