A few stories from my undergrad (some firsthand, some secondhand):
Also, as a source of more of these stories, you might check out the classic experiments measuring various physical constants - gravitational constant, electron mass & charge, etc. Usually they involve a whole series of tricks to control for various error sources.
A friend told me this story many years ago: He was working on repairing some electronic staff and one block had a green light turned on when the block was turned off by a switch, but not disconnected from the power line. However, there are no short circuits in it. After long investigation, mostly for curiosity, he found that some piece of alloy covered another piece and together they created a capacitor, which was able to let in AC part of incoming signal and power the light in the gadget.
In Richard Feynman's talk on cargo cults he mentions a story about experiments with rat mazes (skip if you recognize it)
I also recall some experiment where it was eventually discovered that the control of some microbiology experiment was screwed because the paper towels used in some process were made with wood that was treated with a particular chemical before it was turned into the paper towel (was this linked by gwern at some point?).
I'm interested in collecting any and all examples you have of these events; through painstaking effort someone realized that XYZ was interfering with an intended experiment (extra points if XYZ was completely outside the experimenters initial frame of "factors that might be relevant to this experiment") . Links to source if possible.