IWD has some really good flavour, music and art. These things to do matter in a nuanced discussion. A game is a sum of its parts in the least and more than that oftentimes. IWD is a *good* game. But that does mean we have agreed that all its parts (encounter design, RtwP for example) are good.
That's true: IWD has better art, music, and atmosphere. Another plus can be the customizability of the party, as opposed to ToB pre-made companions (especially since ToB doesn't do much with them).
Apart from this, theyre both extremely linear and monotonous, and with a poor excuse for a plot.
Encounter design is actually worse in IWD, with the same stock groups of creatures pasted over and over again across the same dungeon level(s) (although ToB is pretty stale as well).
Spell selection is also worse in IWD, I'd see we start to see Sawyer's "death from a thousand paper-cuts" approach (which of course makes everything easier to balance).
In both games the itemization tends to be all over the place, suffering from excel-spreadsheet design, and degenerating into many small, heterogeneous characteristics/bonus for a weapon, instead of a single, distinctive one.
As much as I don't like to, I would have to give ToB a small justification in terms of encounters, spells and itemization, since it is constrained by the need of having everything at epic levels (which makes things very difficult), while IWD does not have that excuse.
I'd say art, music, atmosphere and party customization go a long way in shaping the perception of IWD as a vastly superior game, while we are actually talking about two games the cores of which are very similar. And no wonder about that, since they were cranked out in similar conditions, being aimed at getting a quick buck in a very short production time.