Nice question Virginia.
I would say that for men this is of course simpler as one can easily dress to a middle ground that unless it's a black tie event, or a barbecue, you won't be over or under dressed. If you have to be one of them, mostly I would say it is better to be slightly under dressed than over dressed, but it is more a play on the measure, and mostly depends on your character. Some men would prefer to be grossly over dressed, some grossly under dressed. I am saying this about men, as it is completely different, I think, regarding women. Both of these cases. It is not so easy for women to be on the good middle ground as over and under variants are much more distinct. And the choice of over and under does not depend as much on the character - most women would like to dress as high as reasonable, but obviously don't want to be over dressed as it is stranger for them.
As for your answer Ellen, it is nice and funny, but I disagree with one major premise - that you can talk your way out of it. I would think (not being a woman) that the problem is not so much when someone talks to you, you can assume men wouldn't mind you being way over dressed (or should I say less dressed) but rather it is the gazes across the room. When people simply look at you across the room, you can't really say anything.
Nor does it help to say something. Let's say you come into the party and give your great excuse to everyone - does that help you 10 minutes down the line when you look different than anybody?
Some women might not care about looking different and would prefer the good story, good excuse. You might be one of them (I would say that's not a bad quality to have). Some might even prefer to look differently than others - I'm thinking of Bjork coming to the oscars with a strange swan outfit. But most women I think would prefer to not be overly differently dressed. I am thinking here of women (students) who came to their department in the university over dressed - perhaps they found the extra attention interesting, but never repeated that experiment as it wasn't so nice (with different guys who didn't talk to them before talking all of a sudden to them for a long time etc.).
As for outfits - can't say anything about that.