Just about every long-running or critically acclaimed show has at least one major stinker in its run. It's just inevitable when you have so many episodes, some of them are gonna be duds. Sometimes, these episodes can be just as well-known as the great episodes.
I'll start with Code of Honor from TNG. Everything, from the racist undertones thanks to the baffling decision to make the actors playing a primitive alien race who lust after strong women black to the terrible fight scene makes me wonder how anybody involved thought this episode was a good idea.