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
Moncada, López lead White Sox past Indians 5-2
Yoan Moncada hit two of Chicago's four solo homers and Reynaldo Lopez pitched 7 2/3 effective innings, helping the White Sox beat the Cleveland Indians 5-2 on Monday night.
Hernandez crushes 2-run homer
Cesar Hernandez sends a 2-run home run out to right field to tie the game.
Astros extend win streak to 6 with 8-1 win over Tigers
Aledmys Diaz, Robinson Chirinos, Jake Marisnick and Alex Bregman homered for Houston, and the Astros beat the Detroit Tigers 8-1 on Monday night, extending their winning streak to six games.
Padres' Paddack to get biggest test yet -- Kershaw
Chris Paddack's spectacular start to his career will get the spotlight treatment Tuesday when he squares off with Clayton Kershaw.
Moustakas belts homer to upper deck
Mike Moustakas crushes a 412-foot home run to right field to give the Brewers a 3-2 lead.
Surprise pitchers' duel on tap in Miami
When the Tampa Bay Rays and the host Miami Marlins meet for the first time this year on Tuesday night, the pitching matchup will feature two of the most underrated starters in the majors.