The origin of tooth is Old English toð (plural: teð) from Proto-Germanic *tanth/*tunth, which derived from Proto-Indo-European *dont-/*dent- which meant "tooth."
Tooth/teeth is one of those irregular English quirks that gives second-language learners headaches. It is the result of a type of sound change called 'i-mutation.' In phonetics, vowels are laid out in a map that corresponds to how the sound is made in the mouth.
|Vowel Map (source)|
So why does i-mutation happen? Vowel changes usually happen to make word easier to pronounce. At some point in Old English toð was pluralized with the suffix -iz. Over time people started 'fronting' the 'o' sound in toðiz more like the 'i' in the suffix because it's easier to pronounce. Seem strange? Say the word doing aloud. Now say How you doing? as you would if you were talking to a friend. Notice how doing sounds a lot like diwin? That is i-mutation. We do it all the time.