Luke Voit finished with three RBIs for San Diego after he was hit by a bases-loaded pitch from All-Star Gregory Soto (2-5) in the 10th. After Matthew Batten struck out swinging for the second out, Alfaro drove in Jake Cronenworth and Manny Machado with a single to right.
''That was a huge night for Jorge,'' Padres manager Bob Melvin said. ''He'd never caught (Padres starter Mike Clevenger) before, but they made sure they were on the same page all night. He saved the game by blocking some pitches in the dirt in the eight and ninth, and he drove in three runs.''
Cronenworth was hit by a pitch leading off the inning, and Machado reached on shortstop Javier Baez's throwing error.
''We are pretty beat up in the bullpen, and (Soto) was so efficient in the ninth that I felt good about putting him back out there,'' Tigers manager A.J. Hinch said. ''I really liked matching him up with Cronenworth and Manny, but we didn't get the outs.''
Detroit got one back on Jeimer Candelario's RBI double in the bottom half. But Nick Martinez retired Willi Castro on a fly ball to center, earning his fourth save.
''I don't think I'm the hero,'' Alfaro said. ''This was a game where we knew we had to come out and get the win and we all stepped up and did what we needed to do.''
The big 10th helped end San Diego's 38-year quest to win a game in Detroit. The Padres lost the final three games of the 1984 World Series at Tiger Stadium, were swept in a three-game series at Comerica Park in 2007 and lost 12-4 on Monday.
''It has been hard for us to get a win anywhere lately, but we're trying to fight our way out of this tough stretch,'' Melvin said. ''That makes it more rewarding when we come back and put together a 10th inning like we did tonight.''
The Padres rarely face the Tigers, but they had an advantage with Clevinger, who came into the game with an 8-2 record and a 1.65 ERA in 12 career appearances against Detroit.
Those starts came with Cleveland, but he allowed two runs in seven innings Tuesday night.
''I didn't think I had my best stuff, but I had really good command,'' he said. ''Jorge did a great job of calling the game - we were meeting after every inning to go over the plan.''
Candelario finished with two hits and three RBIs. Rookie Riley Greene, All-Star Miguel Cabrera and Harold Castro also had two hits in Detroit's 12th loss in 15 games.
The Tigers trailed 3-0 before rallying in the seventh. Cabrera hit a leadoff double ahead of Candelario's 10th homer, a drive to right.
Castro led off the Detroit ninth with a base hit against Padres closer Taylor Rogers, but Jurickson Profar made a diving catch of Jonathan Schoop's foul fly to left for the first out. Pinch-hitter Eric Haase, who hit a grand slam in Monday's win, struck out, but Robbie Grossman walked.
Greene fell behind 0-2 before tying the game with a single to left, but Rogers (1-4) struck out Baez to force extra innings.
''(Greene) has been comfortable against lefties since he's been here,'' Hinch said. ''But doing it in the ninth inning against a closer at home in that situation shows the maturity he already has. He's a very good player.''
The Padres got good news before the game when Fernando Tatis, Jr. took batting practice for the first time since hurting his wrist in March. Tatis could start a minor league rehab assignment within a week.
The Padres might have won the game with their three-run 10th, but it came at a price. Melvin wasn't sure of the status of Cronenworth (hit in the ribs), Machado (twisted ankle while stepping on first) and Voit (hit in the knee) for Wednesday afternoon's game.
Cabrera's seventh-inning double was No. 606 for his career, tying Paul Waner for 14th place.
As the Tigers struggled through the 10th, fans broke into the Pistons' trademark chant of ''Detroit Basketball!'' as well as ''Let's Go Red Wings.''
The teams finish the three-game series on Wednesday afternoon, with Detroit's Tarik Skubal (7-8, 3.88 ERA) facing Yu Darvish (9-4, 3.28 ERA).
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.