A lottery suggests the idea of gaining through taking a risk with money. Gambling is part of human nature almost since time began, but a lottery is less immediate and in today’s society much less to do with trying to guess the will of the divine.
To dream of winning a lottery would suggest that one has either been lucky or clever in waking life.
To dream of losing might suggest that someone else was in control of our destiny. You might like to consult the entries for gambling, ticket and win / winner.