The Tigers overcame a 4-0 deficit against Kansas City for the second straight game and earned their 10th consecutive win over the Royals this season.
Guillen drove a 1-2 pitch from Affeldt (4-6) down the line and over the left-field fence for his 11th homer.
"I wanted to be patient and put the ball into play," said Guillen, who hit a low curve.
Affeldt was disappointed but gave all the credit to Guillen.
"Threw the pitch I wanted to throw," he said. "He beat me on it."
"I was trying to mix up the Royals and Teahen with different pitches," Jones said. "I got lucky and snapped a fastball for the strikeout."
Detroit's Kenny Rogers, who got the start for the AL in this week's All-Star Game, lasted only four innings in his first outing following the break. He allowed five runs and six hits, walked one and struck out three in his shortest stint this season.
Royals' starter Mark Redman gave up four runs and five hits in five plus innings. He walked three and didn't strike out a batter.
But Kansas City tied it against Joel Zumaya in the eighth on DeJesus' two-out, bases-loaded double.
"You've just got to keep playing," Tigers' manager Jim Leyland said. "We fought back, gave it back to them and fought back again."
Kansas City jumped out to a 4-0 lead in the second.
Berroa singled in a run, and Teahen hit a three-run homer - his second shot in two nights and ninth of the season.
Detroit cut the lead in half in the third on Thames' two-out, two-run triple, but the Royals made it 5-2 in the fourth on Berroa's solo home run.
The Tigers pulled within two runs in the fourth on Monroe's two-out RBI double before Emil Brown's RBI single the next inning made it 6-3.
Detroit caught up with three in the sixth on a RBI double by Chris Shelton, a sacrifice fly by Curtis Granderson and an error by Berroa at short on Placido Polanco's grounder that allowed Shelton to score the tying run.
"Not much I can say," Kansas City manager Buddy Bell said. "Baseball, man. It's just hard to explain sometimes."
- The start of the game was delayed 37 minutes by rain.
- Detroit LHP Mike Maroth went through an 8-minute bullpen session in which he threw fastballs and changeups. He is on the 60-day DL after undergoing surgery on his left elbow.
- Kansas City INF Mark Grudzielanek and 1B Doug Mientkiewicz both remained unable to play and day-to-day with back injuries.