“Gander, to stretch or rubber your neck”. It is claimed that it comes from thieves’ slang.

Those were the days when they hung horse thieves from the nearest tree. You could say "gander" was gallows humor.