The American, 36, made her competitive return earlier in February when she teamed up with sister Venus for the United States in the Fed Cup.
But the 23-time Grand Slam winner has revealed that giving birth “sparked a slew of health complications”.
“I am lucky to have survived,” she wrote in an article for CNN on Tuesday.
“My daughter was born by emergency C-section after her heart rate dropped dramatically during contractions. The surgery went smoothly.
“But what followed just 24 hours after giving birth were six days of uncertainty.”
Williams, the most successful female player of the Open era, has previously said she was bedridden for six weeks after giving birth.
‘I live in fear of this situation’
Williams’ victory at the Australian Open in 2017 was her 23rd Grand Slam title, achieved while she was eight weeks pregnant.
The American is now just one shy of the all-time record held by Australian Margaret Court, but missed this year’s Australian Open in January to give her more time to recover from the birth.
Speaking about the birth, Williams continued: “It began with a pulmonary embolism, which is a condition in which one or more arteries in the lungs becomes blocked by a blood clot.
“Because of my medical history with this problem, I live in fear of this situation. So, when I fell short of breath, I didn’t wait a second to alert the nurses.
“First my C-section wound popped open due to the intense coughing I endured as a result of the embolism. I returned to surgery, where the doctors found a large haematoma, a swelling of clotted blood, in my abdomen.
“When I finally made it home to my family, I had to spend the first six weeks of motherhood in bed.”
Williams, who has not yet decided whether she will compete at this year’s remaining three Grand Slams, has thanked the medical team for keeping her alive.
“I am so grateful I had access to such an incredible medical team of doctors and nurses at a hospital with state-of-the-art equipment.
“They knew exactly how to handle this complicated turn of events. If it weren’t for their professional care, I wouldn’t be here today.”