The New Adventures of Gilligan
Wrong Way Robot
S1 E5:
A geological sampling robot, launched from Cape Kennedy, and meant to explore other planets, ends up crashing on the island. With the Professor busy on the other side of the island, the other castaways become convinced that the robot is an alien, and soon let their prejudices about the "alien" and each other cause havoc. When the Professor returns and explains things to them, they realize that the robot could end up saving them, and that they had been bigoted toward it the whole time.