"Gulliver's Travels" - There was I thinking it was a political/sociological commentary.
It is. It just happens to use a fantasy setting.
Indeed, SF and Fantasy are very vague indicators of setting, not story genre. Every other genre label – Romance, Mystery, Thriller, etc. – describes what the story is about.
Anne McCaffrey's "Dragons of Pern" series is SF. "Star Wars" is Fantasy. As labels, both are so spectacularly vague and hand-wavy as to be functionally useless. I don't use these two labels myself.
And, again, this is another reason why "Doctor Who" has survived for so long: its supposed "genre" doesn't shackle it to a particular subset of stories.