President Donald J. Trump was sicker with Covid-19 in October than publicly acknowledged at the time, with extremely depressed blood oxygen levels at one point and a lung problem associated with pneumonia caused by the coronavirus, according to four people familiar with his condition.

His prognosis became so worrisome before he was taken to Walter Reed National Military Medical Center that officials believed he would need to be put on a ventilator, two of the people familiar with his condition said.

The people familiar with Mr. Trump’s health said he was found to have lung infiltrates, which occur when the lungs are inflamed and contain substances such as fluid or bacteria. Their presence, especially when a patient is exhibiting other symptoms, can be a sign of an acute case of the disease. They can be easily spotted on an X-ray or scan, when parts of the lungs appear opaque, or white.