Well HGttG has spaceships aliens and (depressed) Robots. All clearly Sci-Fi Tropes. so I voted for what is IMNSHO the Sci-fi novel.
I'm going, one day, to write and post a long rant about why we shouldn't identify genres with particular story elements like aliens and robots. Having aliens doesn't make
Hitchhiker any more sci-fi than having vampires makes
Twilight horror.
That said, I actually do think that
The Hitchhiker's Guide to the Galaxy is science fiction. It has started out of a parody of science fiction - much of it deliberately relies on pseduo-science that is absolutely impossible. Elements like the infinite improbability drive are making explicit fun of the ridiculous pseduo-science that a lot of science fiction thrives on. Does this make it science fiction? Probably. But the fact is, I think it works mostly on the meta-level.
This was a tough choice for me. Both are novels I admire and both were influential and formative in my teens. Hitchhiker, perhaps, moreso, overall. But, and this is what made me go for
Dune - my earliest encounters with
Hitchhiker focused almost entirely on the social commentary and absurdist humor. It was only several years later that I understood the science fiction elements of the novel as anything but a colorful backdrop. When I first read
Hitchhiker in my teens, my thought was "hah! people are so ridiculous". When I first read
Dune at a similar age, it made me grasp how large and awe-inspiring the future may be. If the question was which was the better overall, more entertaining, or more personally important novel to me, I would have gone with
Hitchhiker. But
Dune is nigh incomparable, in my eyes, in elevating science fiction to an epic level, and after some soul-searching I had to go with it.