Desktop wallpapers disappear when switch from dual displays to single
I also observed the problem after upgrading my MacBook Air (2011) to Mountain Lion.  Not only unplugging the external display triggers the gray background, but also connecting to a display.

For the gray background problem, I use a quick-and-dirty fix: restart the Dock.
Invoke the following command in the terminal:
$ killall Dock

The Dock will be restarted after it is killed, and the wallpaper will appear again.