The victory evened the Royals' record at 72-72.
Gaviglio (4-5) allowed two runs on six singles and a double over five innings, while walking two and striking out five. He threw 62 strikes in 87 pitches.
Losing pitcher Dylan Covey (0-5) walked Whit Merrifield, Eric Hosmer and Salvador Perez in the first inning before surrendering the grand slam to Moss on the ninth pitch of the at-bat. It was the Royals' fifth grand slam this season.
Moss has homered in three consecutive games, bringing his total to 21.
The White Sox scored single runs in the third, fourth and eighth innings.
Yolmer Sanchez's double in the third scored Rymer Liriano, who began the inning with a single and stole second.
Tim Anderson's single in the fourth brought home Nicky Delmonico, who singled leading off the inning. Gaviglio struck out Liriano and got Adam Engel out on a ground ball to shortstop Alcides Escobar to end the inning.
Rob Brantly's RBI-double in the eighth scored Delmonico.
Left-hander Scott Alexander worked out of danger in the ninth with runners on the corners and nobody out, as he retired the next three batters to earn his fourth save in six chances.
NOTES: RHP Mike Morin was claimed off the waiver wire by the Royals from the Los Angeles Angels. Morin has a 10-8 record with a 4.49 ERA in 177 relief appearances with the Angels. Morin had a 6.91 ERA in 10 outings this season with Los Angeles. ... Royals LHP Onelki Garcia, who surrendered nine runs over six innings, was designated for assignment. ... The White Sox and Royals will open the 2018 season on March 29 at Kauffman Stadium. ... 3B Mike Moustakas and CF Lorenzo Cain, who are slowed by leg injuries, were held out of the Royals lineup, giving them a breather. ... White Sox RHP Lucas Giolito and Royals LHP Eric Skoglund are the probables for the series finale Wednesday.