[This was originally posted on Yevamot 42a. Since we have many new readers since then, it's going up again, with only a couple of slight differences.]
...בן שמנה הרי הוא כאבן ואסור לטלטלו אבל אמו שוחה עליו ומניקתו מפני הסכנה
A child born in the eighth month of pregnancy is (not going to live and so is) treated like a stone; it is forbidden to move him (on Shabbat). However his mother may bend over him and may nurse him because of the danger (to her if she does not do so...)
This belief - that a fetus of seven months gestation may survive, but one born in the eighth month of gestation cannot do so - is very odd. But it wasn't a uniquely Jewish belief.
Homer's Iliad, written around the 8th century BCE, records that a seven month fetus could survive. But it is not until Hippocrates (c. 460-370 BCE, or some 500 years before Shmuel), that we find a record of the belief that a fetus of eight months' gestation cannot survive, while a seventh month fetus (and certainly one of nine month gestation) can. His Peri Eptamenou (On the Seventh Month Embryo) and Peri Oktamenou (On the Eight-Month Embryo) date from the end of the fifth century BCE, but this belief is viewed with skepticism by Aristotle.
In Egypt, and in some other places where the women are fruitful and are wont to bear and bring forth many children without difficulty, and where the children when born are capable of living even if they be born subject to deformity, in these places the eight-months' children live and are brought up, but in Greece it is only a few of them that survive while most perish. And this being the general experience, when such a child does happen to survive the mother is apt to think that it was not an eight months' child after all, but that she had conceived at an earlier period without being aware of it.
The belief that an eight month fetus cannot survive has a halakhic reification: Maimonides ruled that if a boy was born prematurely in the eighth month of his gestation and the day of his circumcision (8 days after his birth) fell out on shabbat, the circumcision - which otherwise would indeed occur on shabbat, is postponed until Sunday, the ninth day after his birth.
ומי שנולד בחדש השמיני לעבורו קודם שתגמר ברייתו שהוא כנפל מפני שאינו חי... אין דוחין השבת אלא נימולין באחד בשבת שהוא יום תשיעי שלהן
(הלכות מילה 1:11)
This belief persisted well into the early modern era. Here is a state of the art medical text published in 1636 by John Sadler. Read what he has to say on the reasons that an eight month fetus cannot survive (and note the name of the publisher at the bottom of the title page-surely somewhat of a rarity then) :
Saturn predominates in the eighth month of pregnancy, and since that planet is "cold and dry"," it destroys the nature of the childe". That, or some odd yearning of the child to be born in the seventh but not the eight month (according to Hippocrates) is the reason that a child born at seven and nine months' gestation may survive, but not one born at after only eight months.
Today, gestational length is of course critical, and, all things being equal, the closer the gestational length is to full term, the greater the likelihood of survival. We can say with great certainty, that an infant born at 32 weeks or later (that's about eight months) is in fact more likely to survive than one born at 28 weeks (a seven month gestation.) In fact, a seven month fetus has a survival rate of 38-90% (depending on its birthweight), while an eight month fetus has a survival rate of 50-98%. Here is the data, taken from a British study.
More recently, a study from the Technion in Haifa showed that even the last six weeks of pregnancy play a critical role in the development of the fetus. This study found a threefold increase in the infant death rate in those born between 34 and 37 weeks when compared full term babies.
You can read more on the history of the eight month fetus in a 1988 paper by Rosemary Reiss and Avner Ash. From what we have reviewed, the talmudic belief in the unusually low survival rate of an eight month fetus (compared to a seven month one) is one that was widely shared in the ancient world. And one that is not supported by any of the evidence we now have.