Welcome to wordorigins. The OED says that the term originated in the US, and cites it back to 1884. No etymology per se is give, but it seems straightforward enough: anyone in attendance at the event (i.e., anyone who had come in the door) had a chance to win the prize.

According to the American Heritage Dictionary,this word originated between 1950-1955.And the meaning:a prize awarded at a dance, party, or the like, either by chance through a drawing or as a reward, as for having the best costume.

The AHD gives dates of origin? This is news to me. The online version sure doesn’t, and I don’t recall the print editions doing it either, though I don’t have one handy.

Anyway, if they say 1950-55, they’re mistaken. The OED shows an 1884 usage from the New York Times:"21 Apr. 8/6 The door-prize of a watch every night has greatly interested the younger members of the congregation.”