And this is precisely why I never buy anything for my dh. If he sees something I might like when he's out and about - a food treat, a book, a scarf, etc, he might get it for me and I'll be touched and grateful and thankful for my thoughtful husband. Admittedly he'd never buy me a dress I said I didn't want, but anyway.
If I see something he might like - something gadgety for a man, a t shirt, a new variety of torch, etc - and I take it home, he'll look largely disinterested and either say "cheers" absently then set it down somewhere never to be looked at again, or he'll uncomfortably explain how he doesn't really like that colour, or its the wrong style/fit, or he'll never read that book, or he's already got one, or he had planned to purchase the £350 superior version of the £10 tat I've just bought him.
The result is that I see lots of things when out and think of him, but I'm hesitant to bring him anything home in fear of his disdain - and he complains that I don't think of him or bring him anything and I only shop for myself. 
Take the dress back for a refund, but don't be mean about it. He meant well, he messed up that's all.