If you setup a "payment agreement" between yourself, the gym (or any similar service), and your credit card, you should be able to cancel that agreement and the subsequent services that agreement entailed through your credit card. The byzantine and manipulative things that gyms do are, in part, because we basically let them control the cancellation process.