To possess something is to sit on it with authority. The word comes from Latin possidēre — a compound of potis ('powerful, able') and sedēre ('to sit'). Ownership, in Latin, was a physical act: you sat upon your land, your throne, your property. You occupied it.
The two roots that compose possess are among the most productive in Indo-European. From potis ('powerful') English gets potent (having power), possible (able to be done), potentate (a powerful ruler), and despot (Greek despotēs: 'master of the house', from *dems-potis). From sedēre ('to sit') come president (one who sits before), sedentary (sitting too much), session (a sitting), siege (a military sitting), and sediment (what sits at the bottom).
The supernatural meaning — demonic possession — appeared in medieval English and uses the same metaphor inverted. If a person can sit in power over a thing, why not a spirit over a person? To be possessed was to have something alien sitting inside you, exercising mastery. The horror is precisely the horror of ownership applied to the self.
The legal meaning dominated from the start. English property law distinguishes between possession (physical control) and ownership (legal title). You can possess something you do not own, and own something you do not possess. The distinction echoes the Latin: possidēre was about sitting on the land, not holding a deed.