I joined a gym last July and dieted at first so lost some weight. Then I stopped dieting but carried on going to the gym and even though I was exercising I put all the weight back on.
I am now back on my diet and go to the gym 3 times a week (plus other exercise) and have lost 10lbs in 2 weeks
If you can afford the gym and have the time to go then I say go for it. You will find if you are eating healthy as well you will start to lose weight/inches.