Modern English has a particularly marked distinction between 'th' and 'd', because the sounds are made in different places - 'th' is dental, while 'd' is usually made with the tip of the tongue against the palate, not the teeth. In many languages the difference is not so clear. In Spanish, for example, 'd' is pronounced as an Englishman would say 'th'. In French and many classical languages 'd' is truly dental (though it still sounds more like 'd' than 'th'). It is very common for sound changes to occur over time in this group of consonants.
Modern German has 'wider' for 'against' but we still retain the Old English 'th' sound in the word 'with'. The original meaning of 'with' was 'against', as in 'withstand' and 'withhold', but at some quite early stage it shifted to a sense of association.
Guy
Felix - if you can't find your Onions, there's a very respectable online etymological dictionary at
http://www.etymonline.com/. I frequently browse it when I'm getting bored watching kids sit exams. An interesting bit of trivia from here is that the etymology of 'dog' is unknown.