1510s, "action of besieging," from French obsession and directly from Latin obsessionem (nominative obsessio) "siege, blockade, a blocking up," noun of action from past participle stem of obsidere "to besiege" (see obsess). Later (c.1600), "hostile action of an evil spirit" (like possession but without the spirit actually inhabiting the body). Transferred sense of "action of anything which engrosses the mind" is from 1670s. Psychological sense is from 1901.
obsession ob·ses·sion (əb-sěsh'ən, ŏb-)
n.
Compulsive preoccupation with an idea or an unwanted feeling or emotion, often accompanied by symptoms of anxiety.
A compulsive, often unreasonable idea or emotion.
A preoccupation with a feeling or idea. In psychology, an obsession is similar to a compulsion.