Sometimes it is hard to tell where sci-fi ends and where fantasy starts. Genres are after all just categorizations and a good movie is always good mainly because it is a good movie, not because it is a good sci-fi, fantasy, action or whatever movie.
Let's take hard science-fiction, not all of it is pure hard sci-fi. In the case of 2001 or Gravity it is rather hard sci-fi on the outside and sublime drama on the inside.
Of course sci-fi is usually set in the future whereas fantasy is set in the past but then again Star Wars is both at the same time, archetypical characters are part of a story which happened "a long time ago in a galaxy far, far away" yet this very past is for us futuristic. You could have the identical structure, i.e. a futuristic past, in a sci-fi movie about Atlantis.
Sci-fi and fantasy have in common that you have more dramatic freedom but then they are not necessary to create dramatic freedom, a David Lynch flick is about a lot of strange, not so ordinary stuff without requiring elves or spaceships. Or, to drive home my point about the irrelevance of genres, elves on a spaceship which is how you could interpret Vulcans: pointy ears, longer lifetimes, a more distanced attitude toward the world.