The idea of demonic possession goes back thousands of years, to before we had film. Most religions carry their own interpretation of what it means for a person to be 'possessed' by a demon or a spirit and it's a complicated, arcane subject shrouded in mystery and ritual.
The Sumerians, thousands of years before Christ, believed all diseases were caused by 'sickness demons' and had their sorcerers attempt early exorcisms as cures. The Quran talks extensively of Jinn (demons) that can drive people to insanity and may only be expelled via worship. In the Bible, Satan and his demons are very much at large using human beings as vessels for devilish deeds. Jesus casts a whole bunch of them out before he's accused of being demon-possessed himself