The Padres led 3-2 going into the ninth and brought on closer Taylor Rogers (1-5), who gave up a one-run lead in the ninth on Tuesday night in a game San Diego eventually won in the 10th.
''This is a tough game, especially for a closer,'' Padres manager Bob Melvin said. ''He's been one pitch away on each of the last two nights and it hasn't worked out.''
This time, Jeimer Canderlario led off with a double before Rogers retired the next two batters. Jonathan Schoop followed with a dribbler down the third-base line for a single that put runners at the corners.
''In the first half of the season, that ball probably rolls foul and Jonathan gets rung up on a borderline third strike,'' Tigers manager A.J. Hinch said. ''Winning this series, and even coming back in the ninth inning before losing yesterday -- that's a lot more like the team we were last season.''
Reyes then hit a drive over the head of right fielder Nomar Mazara to win it. Mazara got close to the wall chasing the ball and let the carom bounce past him, and both runners easily scored.
''It's amazing,'' Reyes said of his first walk-off hit. ''You don't usually get a situation where you can change a series with one swing, but that's what happened today.''
Rogers said his frustration level was high after two bad outings in less than 24 hours.
''In the last few hours, I was really trying to focus on execution,'' he said. ''I just wanted to get out there, get the first hitter out and go from there. Then I give up the double, which shouldn't happen, and all of a sudden, we lose the game.''
Michael Fulmer (3-4), the subject of numerous trade rumors, picked up the win with a scoreless ninth.
''If that was the last appearance I make here, I'm appreciative of everything the organization and the fans have done for me,'' he said. ''If not, I'll see everyone next week.''
The Padres are 14-21 since June 16.
Yu Darvish, who came into the game with a 7-0 record in seven starts against Detroit, allowed two runs in seven innings, striking out 11.
Candelario, who homered three times in the first two games of the series, gave the Tigers a 1-0 lead with an RBI single in the first.
Tigers starter Tarik Skubal faced the minimum nine batters through three innings, but ran into trouble in a 39-pitch fourth. With one out, Jake Cronenworth singled, and after first baseman Harold Castro dropped a foul pop, Skubal walked Manny Machado on 13 pitches -- the longest at-bat of Machado's career.
A wild pitch moved the runners to second and third, and Luke Voit tied the game with a sacrifice fly. Austin Nola walked and Ha-Seong Kim put San Diego ahead 2-1 with an RBI single.
Castro, Miguel Cabrera and Candelario hit consecutive singles in the sixth, with Candelario picking up his eighth RBI of the series on the third.
Joe Jimenez struck out three of the first four batters he faced, but one reached base when Haase dropped the third strike and threw wildly to first. That kept the inning going for Jurickson Profar's RBI single, putting the Padres ahead 3-2.
''We had some great at-bats today - Manny's, obviously, and Jurickson's in the seventh - and we obviously couldn't ask for more from Yu,'' Melvin said. ''We had two outs and two strikes in the ninth - we gave ourselves the opportunity to win the game. It just didn't happen.''
Tigers reliever Andrew Chafin, who got four outs in the seventh and eighth innings, will not accompany the team to Toronto because of his COVID-19 vaccination status.
''My wife and I have discussed it at length and we decided not to get vaccinated,'' he said. ''It's an unfortunate situation, but family and health come first.''
The game was delayed by 20 minutes before starting in a light mist that cleared out in the early innings.
The Padres have Thursday off to fly home before starting a three-game series with the Minnesota Twins on Friday. Blake Snell (2-5, 4.75) will start the opener against Joe Ryan (7-3, 2.89).
Detroit starts a four-game series in Toronto on Thursday, with Tyler Alexander (2-3, 4.05) moving back into the rotation to pitch the opener.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.