If a character in a story uses math to prove that time travel is possible, then builds a machine to travel through time, there's a good chance you're reading a science fiction story. But this doesn't mean that "time travel" = "science fiction." There are several fantasy stories where wizards send people through time. (Want an example? Of course you do. Check out Mark Twain's A Connecticut Yankee in King Arthur's Court. In that book, the main character goes back in time when he gets hit on the head, and he goes forward in time when Merlin casts a spell on him.) What makes Wells's book science fiction is less the "time" part and more the "machine" part.
It's also useful to think of The Time Machine as science fiction because Wells uses this book to examine the scientific theory of evolution. There's some geology and astronomy thrown in here as well, but mainly Wells looks at biological change over time – and he doesn't always like what he sees.
When the Time Traveller travels to the future, he finds a world that at first seems like a paradise, but that hides a dark secret. (Don't tell anyone, but the secret is the Morlocks.) In fact, the future is a horrifying dystopia – the opposite of a utopia. (We're willing to bet that you're familiar with other dystopian stories, like 1984, Brave New World, The Giver, The Hunger Games, The Matrix…) In The Time Machine, Wells is playing with the expectations readers might have from reading utopian literature. For instance, check out the times when the Time Traveller reminds his listeners that they're not getting some made-up utopian novel of the future but the real deal (5.18, 5.40).
When the Time Traveller learns the secret of this horrifying future, he spends the rest of his time on an adventure – fighting in the dark and whatnot against the Morlocks in order to save himself and Weena.
But let's be honest: if you came to this book for intense descriptions of fights and thrilling escapes, you might be a little disappointed. All of the elements for an adventure are here: there's a quest (find the Time Machine), monsters hiding underground, and even a damsel in distress. Yet much of the adventure is covered pretty quickly and dryly. For instance, check out the end of Chapter 10. When the Time Traveller is caught in a trap, Wells could have dwelled on the final fight in the dark, but we get maybe a page of that before the Time Traveller escapes. It's like this type of adventure doesn't interest Wells.
In fact, we could instead think of this story as a scientific adventure. If adventures are often about going off to explore the unknown, then the Time Traveller is engaged in an adventure when he thinks about the world that he has stumbled into. And Wells is very interested in that adventure.
Lastly, not only does the Time Traveller fail to save Weena, which is pretty tragic, but (a) he see the end of the world; (b) no one believes him, so he can't warn people; and (c) he disappears himself – which may or may not be tragic. Even if you hate the Time Traveller and are glad he disappeared (because, let's face it, he never quite fit in), there's still that whole "end of life" thing to deal with. We might call this a cosmic tragedy: not only do bad things happen to good (or good-enough) people, like Weena and the Time Traveller, but in the end, we see that it doesn't really matter from a cosmic point of view.