Boris Johnson and his fiancee Carrie Symonds have named their baby boy Wilfred Lawrie Nicholas Johnson.
The names are a tribute to their grandfathers and two doctors who treated Mr Johnson while he was in hospital with coronavirus, Ms Symonds wrote in an Instagram post.
She posted a picture of herself with the baby, who was born on Wednesday.
And she thanked staff at University College London Hospital, adding: "I couldn't be happier. My heart is full."
The birth came just weeks after Mr Johnson was discharged from intensive care at another London hospital following treatment for coronavirus.
Ms Symonds wrote on Saturday that their son shares his first name with the prime minister's grandfather, and the first of his middle names, Lawrie, with her own.
Wilfred Johnson was Mr Johnson's paternal grandfather.
BBC One's Who Do You Think You Are found in 2008 that he was originally born Osman Wilfred Kemal - but his Turkish surname was changed during World War One.
Ms Symonds added that their son's other middle name, Nicholas, is a tribute to "Dr Nick Price and Dr Nick Hart - the two doctors that saved Boris' life last month".
The decision to pay tribute to the medics is "an insight into just how serious things were for the prime minister" after contracting the virus, said BBC political correspondent Jonathan Blake.
Dr Nick Price and Prof Nick Hart offered their "warm congratulations" to the PM and Ms Symonds.
They said in a statement: "We are honoured and humbled to have been recognised in this way, and we give our thanks to the incredible team of professionals who we work with at Guy's and St Thomas' and who ensure every patient receives the best care.
"We wish the new family every health and happiness."
Mr Johnson was understood to be present throughout the birth on Wednesday, but later returned to Downing Street to lead the response to the pandemic.
He is expected to take a "short period" of paternity leave at some point later this year, Downing Street has said.
Jonathan Blake added that the family will live in the flat above No 11 Downing Street, "so we might see more of the little one in the weeks and months ahead".
Politicians and leaders from around the world congratulated the couple following the birth.
The Queen also sent a private message of good wishes, Buckingham Palace said.