Davis hit his major league-leading 20th homer to ignite a three-run seventh inning for the Orioles, who took two of three from Detroit. Baltimore also rallied on Friday against the defending American League champs after trailing by two runs in the ninth.
"It's obviously huge to win the series at home, especially against those guys with that pitching staff and that lineup," said Davis, who had two hits and scored twice.
Making his third major league start, Gausman displayed the form that made him the fourth overall pick in the 2012 draft. The right-hander went six innings, allowing one run and five hits, striking out four and walking none over six innings in his first game at Camden Yards.
"I felt comfortable today," Gausman said. "I thought today was the most polished and most calm since I've been up here. Obviously, it was fun and I made my debut here today so that was something I'll never forget."
Gausman came in with an 11.00 ERA after yielding seven runs in four innings at Washington on Tuesday. The 22-year-old retired the last six batters he faced, ending the outing by slipping a third strike past Cabrera -- who also hit into two double plays.
"He's the best hitter in the game. I just tried to make my pitches and keep everything down," Gausman said. "If you don't have a good inning against him, he can make you pay for it. It was a good battle. It was fun."
Prince Fielder homered and scored both runs for the Tigers, who have lost five of six. Porcello (2-3) lost for the first time in seven starts since April 20.
Porcello was working on a three-hitter and took a 2-0 lead into the seventh before things unraveled.
After Davis homered, Chris Dickerson singled and took third on a single by J.J. Hardy. Phil Coke entered and gave up an RBI single to pinch-hitter Danny Valencia. Two batters later, Nate McLouth grounded a broken-bat single up the middle to bring home pinch-runner Alexi Casilla for a 3-2 lead.
"He (Porcello) was kind of running out of gas and that was obviously a good chance for us to get into the bullpen," Davis said. "He had pretty much been dominating us the whole game. ... He threw me a hanging changeup and I hit it out and we started rolling after that."
If he could do it over again, Tigers manager Jim Leyland would have gone to his bullpen to start the seventh.
"I botched it, it was my fault," he said. "(Porcello) was pitching terrific, but the way the lineup set up, I should have made the move in the seventh. I didn't make it and it cost us."
It was all going so well for the Tigers -- until then.
"One swing of the bat can turn the momentum in a hurry," Detroit's Torii Hunter said. "The momentum carried after his home run and they ran with it."
Doubles by Davis and Casilla against Darren Downs in the eighth made it 4-2.
Early on, Porcello and Gausman locked in an engaging pitcher's duel. Gausman had just gotten Cabrera to hit into a second double play in the fourth inning when Fielder drove a 3-0 pitch into the right-field seats.
Peralta led off the Detroit fifth with a single, took second on a wild pitch and reached third on a groundout. With the infield in, Gausman retired Ramon Santiago on a bouncer to first base before Avisail Garcia grounded out.
Baltimore turned a season-high four double plays. ... Baltimore's Adam Jones went 0 for 4 with four strikeouts. ... The Tigers acquired 3B Francisco Martinez from Seattle for player to be named or cash. ... Baltimore and Detroit both have Monday off. The Orioles resume play in Houston on Tuesday, and the Tigers host Tampa Bay. ... Baltimore pinch-hitters were 1 for 18 before Valencia delivered in the seventh. Valencia's only other hit as a pinch-hitter came in 2010. ... It was the eighth time Detroit has lost when leading after six innings.
Oakland Athletics finalizing trade for Miami Marlins' Starling Marte
The A's are finalizing a trade with the Marlins for center fielder Starling Marte in exchange for Jesus Luzardo, sources told ESPN.
Fantasy baseball: Mariners on the move
Eric Karabell takes a look at Seattle's decision to deal away Kendall Graveman and why the team may not yet be done wheeling and dealing.
2021 MLB trade deadline tracker, rumors, news, analysis and latest buzz
July 30 is approaching fast. Here's the freshest intel we're hearing, reaction to completed deals and what to know for every team.
Fantasy baseball forecaster: Team hitting ratings
Stay ahead of the game and optimize your fantasy baseball hitters with our forecaster, which provides a rolling 10-day outlook of every team's hitting matchups as well as the potential for stolen bases.
Fantasy baseball forecaster: Pitcher projections for the next 10 days
Keep up to date on who is pitching -- and how well they're expected to do -- with our forecaster, which provides a rolling 10-day outlook of every team's probable starting pitchers with game score projections.
Fantasy baseball: Preparing for a middle-infield surge
Tristan H. Cockcroft takes a look at three potential names to target in order to improve the quality of your middle-infield options, all of whom may see increased action once the trade deadline passes.