Since you asked about color theory, I assume you are already aware of color theory and know a little of how it relates to shadows and highlights. If not, take a look at this article which does an excellent job of explaining how to create objects with shadows when painting.
We can use this information as a tool for creating similar images as this dress. However, it is worth pointing out that the reason why it is so easy for our minds to misperceive this image is because this is a grainy, poor quality jpeg and the lighting is considerably complex.
In fact, part of the reason why this effect is occurring is because this image was taken on a mediocre camera (almost certainly on a cell phone), snapped quickly (causing a bit of blur), and likely scaled-down in quality so that it would be easy to upload to a social media site.
The bottom-line is that for the ocular portion of the nervous system to make a good judgement of a scene, it needs quality "data" coming in. If our brains receive poor data, then it can easily make poor perceptual judgements.
Regarding this image, the lighting is as such that many tend to first notice the really BRIGHT source of light, coming from the window. In our minds, we then assume "Ok, bright light outside, ergo... I must be looking at the shadow-side of this dress."
Being armed with our knowledge of blue-toned shadows and using complementary colors for shadowing, we can now understand why we may perceive that this is a white dress (that is being toned down to a bluish tone for shadowing) and that the gold lace is also being cast in a bluish tone because it is also in a shadow.
For those of us who misinterpreted this scene, we may have to stare at this image for a minute for our minds catch that there is a lot of light-bleeding from light glaring on the lens of the camera.
This means that instead of seeing a dress in a shadow, we are actually seeing it in a room that also has a very-bright light shining on the dress. Our minds then go:
"Oh! This isn't a dimly lit, white/gold dress, it's a well lit black/blue dress! Let me slooooooowly re-adjust our perception so that MAYBE we won't think we're complete idiots..."
We are fooled because both the Black/Gold and White/Blue color-pairs in this image are both close to the center of the complementary color gradients for each color. Since we are close to that center-point of the complementary color scale, and the image quality sucks, our minds simply don't know how to correctly process this image.
How do we use this to our advantage?
I can't give a straight-forward answer because using this information effectively requires a considerable amount of artistic capability in setting up a scene. Though I'm no artist, I can offer some tips.
First, I'd setup a scene with an immediate focal point that isn't the object that you want to use as your "confused" focal point. In the case of our image, this is the very-bright light coming from the window. Make this the first perceived focal point by your viewer and make it, dare I say it, rather garish.
Next, device a scene where an object rests in a place that one would assume is a shadow. As I mentioned, our minds tend to think this dress is in a dark room. If the room is dark, we are seeing shadowed-tones. Create this same effect by using complementary, shadowy colors, but be sure to use colors that are all very close to that grayish-blue tone that is somewhere in the middle of all high-to-low light complementary color scales.
Next, recreate a "light bleeding" effect like the one we see on this image from the light that was shining on the lens of the camera. In fact, this bleeding effect is almost certainly necessary. I can't see how else one could fool the mind without it. It is this light-bleed that makes our minds miss that the object-of-focus is actually well lit, rather than poorly lit. This is a necessary mechanism if we want to fool the mind, and have your viewers question what they are perceiving.
If you can follow these rules, and with a bit of practice, I think you could recreate a similar effect within a digital image, or possibly even a painting. I would mock-up an example of this type of image but this is extremely difficult to replicate. As Scott posted above, the cylinder with the shadows on the checkerboard show a good example of how our minds alter real color, so that we can get a better understanding of what an object really looks like, regardless of lighting, in a three-dimensional world.
However, your end-goal is to create a scene that the eye can't easily correct and, in fact, will misperceive! This will require a certain level of artistic creativity and a lot of experimentation.
Anyway, if you are an artist and hope to recreate this type of illusion in your work, then good luck! I'd love to see someone play off of this psychological effect in art. It's fun to observe and, for a second, makes most of us question our sanity when we are strikingly made aware that the world is often not as we immediately perceive.