pipe dream (n.)

1870; the sort of improbable fantasy one has while smoking opium; from pipe (n.1) + dream (n.). Old English pipdream meant "piping."