The crash was reported at about 1:10 p.m. at a garage on Third Street just north of Folsom Street.
An employee at the parking garage was moving a customer's vehicle, which apparently had some sort of mechanical issue, down a ramp on the fourth floor when the accident happened, police Sgt. Stephen Smalley said.
Something went wrong, and the employee was unable to stop the car before it crashed through a metal barrier and went partway out of the building, Smalley said.
Two pieces of the barrier fell, each about 5 feet long and weighing about 200 pounds, fire Battalion Chief Charles Crane said.
One of the pieces landed in a tree, and the other hit some exterior glass panels above the garage's payment center before landing on the sidewalk, Crane said.
One of the panels shattered, sending glass onto the sidewalk.
Considering the time of day when the crash happened, and the fact that Salesforce.com was holding a large convention across the street at Moscone Center, Crane said, "It's a miracle someone didn't get killed."
The car, a light blue Mazda 3 with Nevada plates, was left hanging partway out of the building, with its front wheels over the edge, Smalley said. The vehicle was towed back into the building and taken away shortly after 2 p.m.
The employee complained of a leg injury and was taken to San Francisco General Hospital to be treated, Crane said. He said the injury was minor.
Fire crews smashed out the rest of the shattered glass panel to prevent any more shards from falling onto the sidewalk, then the garage was reopened at about 2:30 p.m.
Additional glass panels appeared to be damaged, but Crane said they were not in immediate danger of shattering. He said a city building inspector was headed out to the scene this afternoon to determine if more glass will need to be removed from the garage.