Elements such as magic are labeled fantasy because their vocabulary is not scientific, and because they are placed in vaguely medieval worlds that are not historically connected with our present. Yet time travel is just as magical as turning lead to gold. The distinction is in the history, or the lack of one. Any fantastic motif can be science fiction if a history is even implied that leads from our world to the world of the text. If this history is dispensed with, the text is a fantasy.
-- Kim Stanley Robinson, The Novels of Philip K. Dick, p. 26