Redwood City police released surveillance photos of the incident, which happened Friday morning at Kaiser Hospital.
Police say the suspect threatened a worker with the knife and pulled out a replica handgun.
When officers arrived, they say the suspect dropped the weapons and was taken into custody.
The man is identified as 56-year-old Thomas Smith of Redwood City.
Police say no one was hurt during the incident.