Certainly the movie sensationalized demon possession, but the inspiration came from a case performed by the Catholic Church in 1949.
In that case, it was a 13 year old boy from Maryland. The exorcism reportedly went on for several weeks until the boy was finally determined to have been exorcised. Fr. William Halloran, a young priest assigned to the case, kept a diary of what he experienced. And yes, some freaky things did happen, like objects flying around the room and the words 'hell' and 'evil' appearing on the boys body during the ritual. Although there were no reports of pea soup or heads spinning.
The boy's identity was never disclosed by the church, but he is said to have had a completely normal life since the exorcism.
photo: Warner Brothers