No don't ever stop going to the gym.
If your goal is to lose weight - chop off a leg. You could lose about 20lbs or more right there
But if your goal is to lose fat, whilst keeping your lean body mass (muscle, bone, water etc) then lift heavy weights, do interval cardio, eat 4-6 times a day and calorie cycle.
Your weight may have increased due to a number of things (I'm just guessing here since you haven't given us much to go on!). My guess is you're retaining water in your muscles as they are trying to recover. What happens when you lift weights is that you cause micro-tears in the muscles, which then need healing. This healing process is what causes muscle growth and can only occur while the muscle is resting. So when a muscle heals glycogen (energy) and water and all sorts of nutrients go to that muscle to help repair it.
Try taking measurements of your significant parts, chest, waist, hips, thighs, arms - and comparing them.
If you are new to the gym and weightlifting/cardio then you might gain a few pounds with water retention trying to heal the muscles OR you might be hungry from the increased exercise and be eating more than you realise. Are you tracking your calories? Do you know exactly what you're eating? Do you weigh and measure portions so that you know for sure you aren't eating too much?