As recently as the 1980s, doctors did not provide anesthesia to infants undergoing surgery. They thought infants' pain response was just a "reflex", not a conscious experience of pain.
My understanding is that that was in part due to the difficulty of providing the right dosage that would provide pain relief without causing harm. Source: dad was an anesthesiologist.