If your Dock sometimes becomes transparent, and Stacks only show as label backgrounds -- often iTunes' Cover Flow mode stops working, too -- as illustrated here, you can use this Terminal command to recover:
sudo killall -HUP WindowServer
Warning:The above command will log you out and quit all open programs without warning -- so ideally, you should close any open programs before running the command. It does, however, prevent you from having to reboot, which is the only way I'd found to otherwise solve this problem. You can read more about this command in this hint; it's basically a way to restart the GUI without restarting the entire machine.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080326164807807