Tom McMahon BScHons MCOptom from Falkirk, Scotland explains
Light enters the eye through the lens—different wavelengths corresponding to different colors. The light hits the retina in the back of the eye where pigments fire up neural connections to the visual cortex, the part of the brain that processes those signals into an image.
Critically, though, that first burst of light is made of whatever wavelengths are illuminating the world, reflecting off whatever you’re looking at. Without you having to worry about it, your brain figures out what colour light is bouncing off the thing your eyes are looking at, and essentially subtracts that color from the “real” colour of the object! Brains are amazing!
Our visual system is supposed to throw away information about the illuminant and extract information about the actual reflectance but big individual differences exist.
Usually that system works just fine. This image, though, hits some kind of perceptual boundary. That might be because of how people are wired. Human beings evolved to see in daylight, but daylight changes colour. That chromatic axis varies from the pinkish red of dawn, up through the blue-white of noon, and then back down to reddish twilight.
What’s happening here is your visual system is looking at this picture of a dress, and you’re trying to discount the chromatic bias of the daylight axis. So people either discount the blue side, in which case they end up seeing white and gold, or discount the gold side, in which case they end up with blue and black.