The tribute included a surprise video recording:
"I've gotten to spend some time with Willie in the White House and Air Force One. Two places I'd never be if people if people like Willie hadn't pushed us closer to a more inclusive America. His legacy is that giant," said President Barack Obama.
"Nobody told me the president was going to call. I'm surprised that he didn't call my house to tell me he was going do all this stuff, you know it's just a wonderful, wonderful feeling," said Mays.
The cable car was originally built in 1887. It operates on the Powell-Mason and Powell-Hyde Street lines.
Click here for more stories about the San Francisco Giants.
Happy 85th Birthday, Willie Mays!#SayHey85 #ForeverGiant pic.twitter.com/zaaowfn3QO
— San Francisco Giants (@SFGiants) May 6, 2016
Willie Mays birthday celebration in the clubhouse 🎂 #SayHey85 #SFGiants pic.twitter.com/PsWgiskHK0
— San Francisco Giants (@SFGiants) May 7, 2016
Happy B-Day to the Greatest Living Baseball Player! Today we dedicated Cable Car 24 to number 24. #SayHey @SFGiants pic.twitter.com/X0PBK9NHRd
— SFMTA (@sfmta_muni) May 6, 2016