Back-to-back 3-pointers by Anderson brought the Raptors within four at 70-66 with 9:26 left, and he hit another at 8:02 to make it 73-71.
"Alan Anderson got ultra-hot," Hollins said. "He was en fuego. He brought them back into the basketball game."
Memphis responded with consecutive layups by Darrell Arthur and Quincy Pondexter, putting them up 77-71, but Anderson hit another 3 and was fouled by Randolph, converting the four-point play to make it 77-75 with 6:33 left.
No one scored again until 4:09, when Johnson tied it at 77-all on a driving layup.
Just over a minute later, Randolph restored the lead by making a pair of free throws. Conley stole the ball from Gay on the next possession and Randolph was fouled again, making one of two to put Memphis up 80-77 with 2:25 left.
After a missed shot by Gay, Conley made a 3 to increase the lead to six at 83-77.
Lowry gave the Raptors hope, cutting it to 85-82 on a four-point play with 20 seconds left. But Prince rebounded a missed free throw by Conley and Allen sealed it with a pair at the line.
"It was very much like a playoff game with the way the attitudes were and the emotions out there," Conley said. "Both sides played very hard and the crowd was into it. It was a big game."
The Grizzlies missed their first eight field goal attempts of the game, but it was Toronto who struggled most with its shooting in the opening quarter, making just four of 20 shots. Gay missed all four of his attempts in the first against his former team as Memphis led 19-14 after one.
Randolph had six points in the second and Jerryd Bayless and Prince added five each as Memphis took a 43-32 lead after two. The half ended with a frustrated DeMar DeRozan hurling the ball skyward, only to have it get stuck inside the scoreboard hanging over center court.
Johnson had 10 points in the third, including an emphatic dunk over Randolph, and Gay added seven for the Raptors, but Conley scored six points for the Grizzlies and Memphis took a 66-57 lead into the final quarter.
NOTES: Both teams are 6-3 since the Jan. 30 trade. ... Toronto matched a season-low for first-quarter points. The Raptors also had 14 in a Feb. 13 win at New York. ... Casey said he would like to add a third point guard before Thursday's trade deadline.