Mike Conley added 18 points and five rebounds for the Grizzlies, who overcame a 12-point fourth quarter deficit. Memphis has won three straight games and five of six.
David Lee registered a double-double with 22 points and 13 rebounds for Golden State, which has lost six consecutive contests.
After Nate Robinson's jumper gave Golden State an 86-74 lead early in the fourth, the Grizzlies closed the contest on a 24-8 run. Cunningham netted seven points while Mayo added six during the surge.
Following 1-of-2 from the foul line by Cunningham, Lee's driving layup pulled the Warriors within 94-92 with 2:31 remaining.
But Golden State never got closer as back-to-back field goals by Marc Gasol and Rudy Gay made it 98-92 with 1:31 to go.
Lee missed two crucial free throws on the Warriors' ensuing possession to seal their fate. Lee netted 10 first-quarter points and the Warriors led, 24-20, after a quarter of play.
Neither team led by more than five in the opening half, and the contest was deadlocked at 50 heading into the locker room.
Dorell Wright knocked down a pair of triples and netted eight points during a 10-0 Golden State surge as they led, 62-54, with 7:43 remaining in the period.
A bit later, the Grizzlies responded with an 8-1 spurt and Conley's layup pulled Memphis within 67-66 late in the frame.
Robinson finished with 18 points and five assists...Both teams shot 46.3 percent from the field...Memphis led in the second chance points category, 17-5...The Grizzlies were 9-of-17 from beyond the arc while Golden State was 7-of-18.
For more on the Warriors, head over to Golden State of Mind.