According to Dr LeGrand G Capers in his article published in the American Medical Weekly on November 7, 1871, this actually happened. Dr Capers was the chief surgeon attached to Cuttshaws Battery during the Vicksburg Campaign. He stated that the incident occurred during the very real Battle of Raymond, Mississippi May 11, 1863. He stated in the article that the baby was born to the young lady in question 278 days later who had been examined pre-birth and found to have an intact hymen, suggesting no sexual contact. To tie up loose ends it was also stated that he removed the deformed minie ball from under the babys skin after birth.
As reported by the popular culture/urban legends debunker Snopes, the American Medical Weekly published in its November 21, 1874 edition that the Son of a Gun story was a gag. This however did not stop the original article to be passed around and even sited as fact again in the New York Journal of Medicine in 1959.
Next thing you know, they'll be tryin' tuh convince us that "Robert E. Lee was descended from a ape..."