The blaze is thought to have started in the emergency room at Sejong Hospital in the south-eastern city of Miryang.
Nearly 200 patients were inside the building and an adjoining nursing home when the fire broke out in the morning.
It is South Korea’s deadliest fire in almost a decade and the death toll is expected to rise with several of the injured in critical condition.
Firefighters said the victims appeared to have died from smoke inhalation. Three hospital medical staff – a doctor, nurse and nursing assistant – are among the victims.
Authorities have given varying death tolls, with police earlier saying 41 had died. But the officials later corrected this, saying some victims were counted twice.
The fire completely gutted the hospital’s first floor, South Korea’s Yonhap news agency reports.
Miryang is about 270km (168 miles) south-east of the capital, Seoul.
The hospital specialised in caring for elderly people with long-term needs, as well as other patients, reported the daily JoongAng Ilbo – and reports suggest many patients would have been too ill or old to escape alone.
The paper quoted a surviving patient, Jang Yeong-jae, as saying that he was on the second floor when nurses screamed “Fire!” in the hallway and urged people to evacuate.
“But when I opened the exit door, the whole stairway was filled with dark smoke and I couldn’t see a thing,” he said.
“Everybody was running around in panic, falling over and screaming as smoke filled the rooms.”
Mr Jang said he ripped open window screens and escaped down a ladder put up by firefighters.
“There were so many elderly patients on other floors… I wonder if they escaped safely,” Mr Jang’s wife was quoted as saying.
Fire chief Choi Man-woo told reporters the cause of the fire was not yet known.
The hospital building did not have any fire sprinklers installed, local media said.
Under current laws, the building was not required to have sprinklers, but they were in the process of being fitted in the adjoining nursing home.
A new law that is due to come into force on 30 June will make sprinklers compulsory for nursing homes. (Courtesy BBC)