Alston had missed his last 23 shots over three games before his layup sparked a 15-2 run in the third quarter. He made his next six shots as Toronto outscored Golden State 36-17 in the third quarter.
"Someone brought it to my attention: 'You know you're 0-for-23,'" said Alston, who clasped his hands together and looked up to the rafters when he finally ended the misfiring streak. "To go 0-for-23 is incredible. It's just great to get the monkey off my back."
Morris Peterson had 21 points and Alston added 15 for the Raptors, who led by as many as 30 points.
Chris Bosh had 21 points and a career-high 17 rebounds, his fourth straight double-double for the Raptors, who are 5-6 since trading Vince Carter to New Jersey on Dec. 17.
The second-year forward grabbed 16 rebounds in a game twice.
"I know what it takes to play at this level for three or four games," Bosh said. "The minute I don't play well I have to see what I did wrong because sometimes you have to take a step backwards to take a step forward."