If it were me, I would figure out what you'd think is a fair price for an ala carte drop-in visit. I think I'd pay about $5 to drop into a gym. So, if my gym membership costs $100/month, I better go 20 times, or I'm paying more than I think it's worth.
As a general "why have a gym membership" response, I'm a lot more likely to go to the gym and get a harder workout if I attend a class instead of doing a solo workout
(I like yoga and barre best, powertone or cardio circuit are also fun). External motivation, loud music, peer pressure, and accountability all work wonders on me. I get into much better shape when I'm in that group setting. I'm an awful lot less likely to just go on a run by myself. So, I pick reasonably priced gyms that have classes I like, and sign up in advance for classes so I am registered for a spot and feel obligated to attend, even if I'm not feeling like it.