This article was reported by Jodi Kantor, Kate Zernike and Catrin Einhorn and written by Ms. Kantor.

Sarah Palin’s baby shower included a surprise guest: her own baby. He had arrived in the world a month early, so on a sunny May day, Ms. Palin, the governor of Alaska, rocked her newborn as her closest friends, sisters, even her obstetrician presented her with a potluck meal, presents and blue-and-white cake.

Most had learned that Ms. Palin was pregnant only a few weeks before. Struggling to accept that her child would be born with Down syndrome and fearful of public criticism of a governor’s pregnancy, Ms. Palin had concealed the news that she was expecting even from her parents and children until her third trimester.

But as the governor introduced her son that day, according to a friend, Kristan Cole, she said she had come to regard him as a blessing from God. “Who of us in this room has the perfect child?” said Ms. Palin, who declined to be interviewed for this article.

Since that day, Trig Paxson Van Palin, still only 143 days old, has had an unexpected effect on his mother’s political fortunes. Before her son was born, Ms. Palin went to extraordinary lengths to ensure that his arrival would not compromise her work. She hid the pregnancy. She traveled to Texas a month before her due date to give an important speech, delivering it even though her amniotic fluid was leaking. Three days after giving birth, she returned to work.