The Rays (65-66) won their second games in a row.
The Orioles (63-68) fell for the 11th time in 12 games, and their scoreless streak stretched to 19 innings before they finally broke through with three runs in the seventh.
Tampa Bay got a spectacular catch from center fielder Kevin Kiermaier in the first inning, taking a home run away from shortstop Manny Machado, and the Rays finished with 10 hits.
"Great way to start off the long road trip," Rays manager Kevin Cash said. "The offense came out swinging. We knew the game plan with (Baltimore starter Wei-Yin) Chen coming in. (He) pounded a bunch of those righties inside (with fastballs), made it difficult to get some solid swings on the ball. But we were lucky that we did."
Beckham, the Rays' designated hitter, had a sacrifice fly and a solo homer. Third baseman Longoria added a solo shot, while shortstop Cabrera hit a two-run homer.
Tampa Bay second baseman Logan Forsythe banged out a single, a double and a triple while scoring twice in a 3-for-4 effort.
All of that proved plenty of support for Archer (12-10), who needed 113 pitches to get through six innings. The right-hander allowed four hits but escaped trouble in three frames.
"The Orioles are a good team," Archer said. "Their approach against me is very, very sound. They always drive my pitch count up. They force me to make pitches in tough situations."
Chen (8-7) pitched well in the first three innings, but everything fell apart after that. He gave up four runs on eight hits in the fourth and fifth and left after 4 2/3 innings when the Rays took a 5-0 lead -- ending the left-hander's four-game winning streak.
Beckham's homer off right-hander Brad Brach made it 6-0 in the sixth before center fielder Adam Jones (RBI single) and designated hitter Steve Clevenger (two-run single) helped the Orioles cut the lead to three an inning later.
Rays right-hander Brad Boxberger came on in the ninth and recorded his 33rd save.
Kiermaier set the tone in the first when he leaped, got his arm over the fence and yanked the ball back into play, robbing Machado of a homer. The center fielder came out of the game two innings later with a mild right ankle sprain, but Cash, Archer and others in the Tampa Bay clubhouse thought his grab turned the game around.
"The ball carried a little bit, and I just kept ... going back," Kiermaier said. "Thankfully, I timed my jump good enough. It was fun to make a play like that. I was just happy to make the catch and not let them start the game off with (a homer)."
Instead, the Rays grabbed a 1-0 lead in the second when Forsythe tripled and scored on Beckham's one-out sacrifice fly.
Tampa Bay made it 3-0 in the fourth on Cabrera's two-run homer with two outs. The lead expanded again in the fifth when catcher Rene Rivera led off with a double and later scored when left fielder Joey Butler grounded into a double play.
Longoria then followed with his homer to make it 5-0.
The Orioles finished with eight hits but stranded 11.
"It seems like we're always a hit away," Orioles manager Buck Showalter said. "Had trouble grouping a whole lot together other than one inning. It doesn't always work out like you'd like to have it drawn up every night."
Machado, starting at shortstop for the first time in his career, said the Orioles can't go up swinging for the fences every time.
"Don't try to go up there and hit homers," he said. "Obviously, that's going to help us in some situations, but live in the moment. Live in the pitch. This is a team. Let the other guy behind you pick us up."
NOTES: The Orioles began the game with three catchers in the opening lineup. Matt Wieters (first base) and Steve Clevenger (DH) both started out of position while Caleb Joseph began behind the plate. ... Baltimore minor league RHP Steve Johnson, who pitched for the Orioles in 2012 and '13, was in the clubhouse and likely will be activated Tuesday when the rosters expand. Johnson was 4-1 in 32 games (three starts) with Triple-A Norfolk. His father, Dave, also pitched for the Orioles. ... The Rays are one of just four American League teams -- along with the New York Yankees, Kansas City Royals and Houston Astros -- that have not been four games under .500 this season. ... Starting Monday, the Rays were set to play 26 of their final 32 games against teams from the American League East. The Rays are 25-26 against their division foes.