There are a couple plugs inside the tail gate that could be loose.... I feel your pain, check the FAQ thread for more info on troubleshooting the rear window.
I had a broken contact at the back of the switch in the gate one time, that's fun to fix!!! Best of luck!