The deal involves seven players, with the Kings sending John Salmons, Greivis Vasquez, Patrick Patterson and Chuck Hayes to Toronto in exchange for Gay, Aaron Gray and Quincy Acy. It was required to be a large trade to accommodate Gay's salary, which is more than $17 million this season.
Gay, Gray and Acy will not be in uniform when the Kings host the Dallas Mavericks on Monday night. Their first game will likely be against Utah on Wednesday night in Sacramento.
Yahoo! Sports earlier reported the trade.
The Raptors are giving up on Gay less than a year after trading for him and are essentially offloading his contract, which has another year and $20 million on it, for three players who will be free agents after this season.
Sacramento has been very aggressive under new owner Vivek Ranadive, who has cleared additional spending to attempt to upgrade the roster. Gay, who was traded last January by the Memphis Grizzlies in a similar money dump, is one of the highest-paid players in the league.
"Rudy is a prince of a guy," Raptors coach Dwane Casey said. "He's an athletic, dynamic wing player. Gets to the basket at will. Can shoot the ball. Handle the ball. We were using him more in a drive situation, pick-and-roll situation. He was growing into that roll, doing a better job because he can see over the defense.
"That was a different role for him to do that, but he was warming to it. And doing a good job with it, bringing the ball down the floor and breaking pressure."
The trade for Gay was one of the last acts of former Raptors general manager Bryan Colangelo, who resigned last summer. New general manager Masai Ujiri has been attempting to offload long-term contracts, and this move accomplishes that. Combined with the trade of Andrea Bargnani to the Knicks during the offseason, the Raptors will have cleared more than $20 million off their books for next season.
Gay is second in scoring on the Raptors, averaging 19.4 points a game. However, he is shooting just 39 percent, which would be a career low. Acy and Gray are not rotation players in Toronto and have combined to score just 24 points this season.
Vasquez has been the Kings' starting point guard, but this move clears the way for successful backup Isaiah Thomas to move into that role. Salmons, Patterson and Hayes have mostly played as backups this season. Hayes is the only player with a guaranteed contract after this season.
Information from ESPNLosAngeles.com's Ramona Shelburne and The Associated Press was used in this report.