At night, all cats are gray
All cats are gray in the dark
Well, this is due to the fact that humans (and probably other species) can't see colors when there's next to no light and therefore, everything (not just cats) appears to be gray. It's got something to do with our eye structure (the rods and the cones).
I am pretty sure this particular saying has a bunch of more profound meanings. It may mean that people you don't know all look/seem the same (night/darkness would refer to the unknown) and it's only when you get to interact with them (get to know them) that they become different from one another. Well, that's my own personal take on it anyways.