Ronald Bailey reviews research on the subject. On the one hand:
[Dr. Maureen Condic, an associate professor of neurobiology and adjunct professor of pediatrics at the University of Utah School of Medicine] does acknowledge that the “long-range connections within the cortex that some believe to be required for consciousness do not arise until much later, around 22-24 weeks.” But she believes that the fetal neural structures needed to detect noxious stimuli are in place by 8 to 10 weeks of development. She further asserts: “There is universal agreement that pain is detected by the fetus in the first trimester. The debate concerns how pain is experienced, i.e., whether a fetus has the same pain experience as a newborn or an adult would have.”
As evidence that it is possible to feel pain without a cortex Condic cites the fact that children born without a cortex and animals whose cortices have been removed will withdraw from pinches, burns, and so forth. As further evidence for fetal pain, Condic cites studies showing that various medical treatments applied to fetuses in the womb boost their stress hormone levels.
On the basis of this evidence, Condic contends, “Direct experimental evidence from adult humans contradicts that the assertion…that mature pain perception requires cortical circuitry.”
On the other:
The RCOG’s report, Fetal Awareness: A Review of Research and Recommendations for Practice was issued in March 2010. “In reviewing the neuroanatomical and physiological evidence in the fetus,” it found, “it was apparent that connections from the periphery [of the fetal body] to the cortex are not intact before 24 weeks of gestation and, as most neuroscientists believe that the cortex is necessary for pain perception, it can be concluded that the fetus cannot experience pain in any sense prior to this gestation.” In other words, while fetuses can react to pain, at the 24-week stage of brain development there is no subject present that is capable of experiencing pain.
(Photo: A 19 weeks old fetal bone development is displayed in VAM Design Center of Budapest on April 2, 2012 during an exhibition of the ‘Bodies2’. This unique exhibit is a display of several authentic human specimens, including whole bodies, individual organs and transparent body slices preserved through a special process called plastination. By Attila Kisbenedek/AFP/Getty Images.)