As many others before me have already stated, plot twists are simply a storytelling tool. They are not inherently good or bad- it depends on how they are implemented into the narrative as a whole.
One of my personal philosophies regarding plot twists is that a plot twist can only be considered truly great if the story and twist hold up when the plot twist has already been spoiled, or you are experiencing said story for a second time. If you still feel power in the moment of the twist, if you still feel like a specific narrative point has been made, then the twist has been a success, as it is a part of the story being told, not the entire story. If the story now feels "ruined" because you had a plot twist spoiled, it is quite likely that the story was being held up by the twist, and without it, it doesn't have a leg to stand on.
To be clear, I'm not advocating the stance that all spoilers are okay. I hate having a twist spoiled just as much as the next person (Using recent examples, although I think both of these narratives have great twists that hold up even when already known, I can tell you that if Bioshock Infinite and Iron Man 3 had been spoiled for me beforehand, I would have been quite unhappy). However, good twists hold up regardless of whether you know them in advance or not, as that means that they have something to say about the characters and narrative at play. The twist is more than just a narrative "gotcha!" moment- the twist causes you to reevaluate the story as a whole and learn something important about the nature of the characters or the points the story is trying to make. I had "would you kindly?" spoiled for me LONG before I first played Bioshock, but I still felt the power in the Andrew Ryan scene. I understood the points it was making about free will and game narrative, and the moment (in addition to the rest of the story) held up regardless of the fact that I knew it beforehand. Contrast that to latter-day M. Night Shyamalan films and similar things- if a story is "ruined" by spoilers, chances are good that it wasn't that great of a story to begin with.
A good narrative needs to have stronger foundations than simply surprising the audience.