Judge hit a solo drive in the first inning and connected with a runner on in the third . The 6-foot-7 slugger had 52 homers in 2017 and 27 last season.
Both long balls came off Dylan Bundy, who allowed a major league-high 41 home runs in 2018. Judge came in batting .154 with one homer against the right-hander.
"I watched a lot of video on him, had a lot of at-bats against him," Judge said. "I got some pitches, they were over the plate and I was able to do some damage on them."
Judge provided all of New York's offense until the eighth. With Baltimore leading 4-3, Miguel Castro (0-1) issued a two-out walk and a single before Frazier put a 2-2 slider into the left field seats. After a concussion in spring training wrecked his 2018 season, Frazier was recalled from the minors Monday and had not homered in the majors since July 28, 2017.
"Huge, man," manager Aaron Boone said. "That's a tough customer when you're facing Castro there. He can make you look bad with his stuff. Two strikes, didn't give in, got a hanger and showed off the power that you guys have all seen he possesses."
Right after contact on Judge's second homer and Frazier's shot, Orioles catcher Pedro Severino ripped off his mask in frustration.
After starting the season by losing two of three to both the Orioles and Detroit at home, New York has rattled off successive victories in Baltimore and will go for a series sweep Sunday.
Trey Mancini hit his fourth home run for the Orioles, who have dropped three in a row and now stand at 4-4.
"I just love the fight in our guys," first-year manager Brandon Hyde said. "We've just had a couple tough pitches out of the `pen recently."
Castro's outing, for instance.
"He had been throwing the ball good," Hyde said. "He just made a bad pitch in a tough spot. Frazier made him pay for it."
The Yankees have won seven straight at Camden Yards, matching their longest streak at the stadium since it opened in 1992. New York has also homered in 13 successive games at the ballpark.
In this one, the Yankees had to rally after Judge gave them a 3-1 lead in the third. Renato Nunez singled home a run in the fifth for Baltimore, and pinch-hitters Chris Davis and Rio Ruiz drove in runs with outs in the seventh to make it 4-3.
With the bases loaded and two outs in the eighth, Davis grounded out sharply to first base against Chad Green. Davis is 0 for 19 this season and hitless in his last 40 at-bats dating back to September.
DOUBLE THE FUN
Judge has eight career multihomer games -- four against the Orioles.
Thairo Estrada's stay with the Yankees lasted one game. Called up on Thursday, the infielder was optioned back to Triple-A Scranton/Wilkes-Barre after New York selected the contract of infielder Giovanny Urshela from the same minor league club. The shuffle was designed to fill the void after shortstop Troy Tulowitzki went on the injured list with a calf strain.
TO THE `PEN
Veteran right-hander Dan Straily joined the Orioles. Signed to enhance the starting rotation, Straily will begin his tenure in Baltimore as a reliever.
"He hasn't pitched in a competitive situation in a while, so we're going to utilize him out of the bullpen and kind of ramp him up to join the rotation at some point," Hyde said.
Yankees: Reliever Dellin Betances (shoulder) threw a 36-pitch bullpen Friday and is expected to face hitters on Monday. ... Luis Severino (shoulder) played long toss Saturday and felt fine, Boone said, adding the right-hander has yet to throw off the mound.
Orioles: C Austin Wynns, on the IL with a left oblique strain, "is progressing really well," Hyde said. "He seems healthy and ready to go."
Yankees: Domingo German (1-0, 0.00 ERA) pitches the series finale Sunday after tossing five innings of one-hit ball against Detroit on Monday.
Orioles: David Hess (1-0, 0.00) takes the mound after keeping Toronto hitless for 6 1/3 innings in his first start of the season Monday.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Is a shortened MLB draft the best idea?
Kiley McDaniel breaks down the possible repercussion of MLB having a shortened draft due to COVID-19.
Joey Gallo shows off his work from home setup
Joey Gallo isn't letting quarantine stop him from getting hits in.
Colon shows off billiards skills
Bartolo Colon hits a trick shot, sinking four balls at once.
What the MLB deal with players means for 2020 season and beyond
From salaries to resuming play, and its impact on the draft and the minors, answering how the agreement will shape the game's future.
Kurkjian recalls Rose's hitting display after getting out of prison
With March 27 being the anniversary of a 1989 story Sports Illustrated wrote about Pete Rose's gambling, Tim Kurkjian tells the story of when Rose put on an impressive display at a batting cage after getting out of prison.
MLB's options to restart season
Jeff Passan explains how MLB is looking at possibly restarting the season in June and maybe playing more doubleheaders to get in as many games as possible.