I know the pass is good for Versailles palace, but does it also work for the gardens?
Yes, it's good for the gardens EXCEPT on Musical Fountains and Garden days. If you go on one of these days, you can use the museum pass to get into the chateau, and then you'd have to pay to get into the gardens.
Here are the days where you have to pay:
http://en.chateauversailles.fr/plan-your-visit/musical-fountain-shows-musical-gardens#the-musical-fountains-show
there is no cost to enter the gardens on non fountain days whether you have paid to enter the chateau or not so the Museum Pass is not relevant those days. Anyone can just walk in. On fountain days you have to pay 8 Euro to enter and this is not covered by the Museum Pass.
As said above, the pass works for everything except the musical gardens - so when it's not a musical gardens day, you don't need to pay extra. I somewhat wanted to plan to see the gardens with fountains and music going, then gave up because it didn't seem there would be many days in late September. As luck would have it, the day I went it was a musical gardens day. It was less interesting than I expected, the fountains - as far as I could tell - take turns being on rather than everything on at once (might be related to late season). I took time to see a couple of fountains but I didn't plan to spend my entire time there and moved on fairly quickly.
We on the other hand went to the gardens in late October a couple of years ago and thought the fountains were wonderful:
https://janettravels.wordpress.com/2016/02/15/fountains-of-versailles-a-little-chaos/
To each his own. Most of the fountains ran an hour and a half in the morning and then again in the later afternoon; some continuously and some not. As you can see from the snapshots we saw many of them functioning. To us it was worth a trip to Versailles just for the fountains; we didn't even bother with the chateau on this trip.