No member of the current Grizzlies team was on the roster for that last win.
Lou Williams scored a career-high 31 points, Elton Brand added 22 and Andre Iguodala had 15 for the Sixers (5-7).
With the Grizzlies leading 98-95, Gay connected on a 17-foot jumper from the right wing with a second remaining on the shot clock to seal the victory. Gay scored 12 points in the fourth quarter on 5-of-7 shooting and finished the game with 10 rebounds.
A number of Allen Iverson jerseys were visible throughout the arena as the crowd anticipated the return of the former Sixers All-Star guard. Though Iverson was waived by the Grizzlies on Tuesday, a larger-than-usual crowd of 14,269 still showed up at the Wachovia Center.
Without Iverson, the young Grizzlies raced past the Sixers en route to a 10-point lead in the fourth quarter.
A jumper by Iguodala cut the lead to 92-86 before Marcus Williams hit a jumper and Gay followed with a fast-break layup for a 96-86 advantage with 4:08 remaining.
The Sixers scored five straight to get within 96-91 before Mike Conley hit a layup, his first field goal, for a 98-91 lead with 1:52 left.
Leading 72-71, the Grizzlies went on to score the final six points of the third quarter on a 3-pointer by Mayo, a free throw by Williams and a driving layup by Williams for a 78-71 advantage. Williams scored 16 points for the Sixers as they held a 50-49 advantage at halftime.
NOTES: Sixers C Primoz Brezec was called on for the first time this season, playing four minutes in the first half. He was 0 for 3 with two rebounds. ... Memphis missed all four of its 3-pointers in the first half. ... The Sixers play seven of their next eight games on the road. ... Memphis outrebounded the Sixers 48-28.