Manuel Gallegos, 43, of Fremont, was found at about 5 a.m. Saturday with head injuries that suggested some sort of fall, hospital spokeswoman Rachael Kagan said.
His identity was initially a mystery, and hospital officials and San Francisco sheriff's deputies released photos of him in his hospital bed and asked for the public's help in learning his name.
After the public outreach, a relative of Gallegos came forward Sunday night and identified him, Kagan said. He died at the hospital that day.
Gallegos will be an organ donor, according to Kagan.
More information on becoming a donor can be found on the California Transplant Donor Network's website at www.ctdn.org.