The Tigers led 3-1 going into the sixth, when the White Sox loaded the bases on an error, a walk and a base hit. Phegley delivered a drive to left that ended up in the bullpen, turned the game around and chased Detroit starter Anibal Sanchez (7-6) from the game.
Sanchez was charged with five runs (four earned) on seven hits and three walks. He struck out six.
Chris Sale (6-8) scattered 10 hits and two walks over 6 2/3 innings. He struck out eight. Two of the hits were home runs, with Matt Tuiasosopo connecting for a two-run homer in the second and Miguel Cabrera hitting his 30th of the season in the fifth.
Only Baltimore's Chris Davis, with 34, has more home runs this year than Cabrera.
Alejandro De Aza singled to open the game and Alexei Ramirez doubled to put the White Sox up 1-0. The homers from Tuiasosopo and Cabrera gave the Tigers a 3-1 lead that fell the next inning when Phegley hit the grand slam, his third home run this year.
De Aza added a home run in the eighth for Chicago.
Wisconsin business offering 'therapeutic cuddling' forced to close
Selena Gomez drops F-bomb, walks off stage during Jingle Ball performance