Where does the word what come from?
Why do we say wot when it's spelt the way it is?
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
The explanation stated:
Old English hwæt, of Germanic origin; related to Dutch wat and German was, from an Indo-European root shared by Latin quid.
So I guess it originated from Germanic, used by Latin quid.
You can also find the brief history here, as how @oerkelens wrote in the comment.
As for the pronunciation, I don't fully agree with what you said about "we" say it (h)wot. Not every speaker does so (well maybe speakers in UK do). Although yeah, some people do (maybe you too). But the pronunciation varies quite a lot. Some people also say it (h)wət. Some say it (h)wät. So I don't think the pronunciation variation has any relation to the word's origin. It's only a matter of accents, all over the world.
I would say "what" is connected with Latin quod, actually the relative pronoun neutre. Etymonline gives the Latin quid, the interrogative pronoun neutre. The q-sound was kept in French quoi, and abandoned in German and English where the Latin u appeared as a w-sound. The h in English what is a remembrance that there was qu in Latin.