I think I found the clues to beat the crowds here at Versailles:
visit in the low season
book your ticket beforehand on the internet and print it
stay overnight in the pleasant town of Versailles
be at the gate a little before opening time (9 a.m.)
go fast at the first rooms (to shake off other early birds)
I just did all that on a Sunday morning in December. There were about 40 people waiting at the gate at 9 a.m., including a Chinese tour group. I beat them all at the start, was the first to go in that day and had the rooms almost to myself.
The gardens open already at 8 a.m., and I wandered around them a bit before visiting the interior. It was quite foggy, but that gave an extra mysterious touch to the surroundings. The grounds were still muddy and slippery from the heavy snowfall that had struck the Paris region last Wednesday (and even caused the Palace to close for half a day). A large golden sculpture by the Japanese artist Takashi Murakami attracts a lot of attention at the moment. It is part of a temporary exhibition, his works are also in the interior of the palace.
What did I think of my visit? The bottom line of all the other reviews below I found to be true: the Hall of Mirrors and the Gardens are the most memorable parts. I had visited the Castle of Fontainebleau the day before, and I enjoyed its interior more than Versailles. The latter is better on the exterior and the gardens (it's quite a hike to get to the Grand Trianon for example). The walk through the apartments in Versailles gets a bit tedious, rooms aren't as bright and interesting as in Fontainebleau, and I found the audio guide too boring to listen to. But maybe 2 European castles in 2 days is too much to bear...