The Short Answer
Not everyone will gain weight as a result of starting a new fitness program, but it does happen and it can be discouraging. If you do happen to gain a few pounds when starting a new program, the chances are really good that it’s not fat, but rather temporary water weight due to inflammation. Give your new program at least three weeks to really get a feel for how it's working for you.
The Long Answer
To make these repairs, your body initiates its standard healing process, including the inflammation phase. This is why I usually discourage anti-inflammatory medication like Advil to help sore muscle from exercise, because you WANT your body to go through this process. This involves recruitment of white blood cells and opening up blood vessels to flush out debris and toxins. There’s so much going on that the area swells up and retains water. The fluid required for inflammatory response obviously weighs something—and that might be reflected in the number on the scale. But don't worry - this type of inflammation is healthy and temporary!
A less-likely reason you’re gaining weight is that you’re building muscle faster than you're losing fat, and muscle is denser than fat. If this happens, you'll likely notice it over a few weeks and you can tell by tracking your measurements and how your clothes fit. The trick is patience. Once you lose the fat, which you will if you keep at it, you'll love your new body!
But what if something actually is going wrong?
There are a couple situations in which you might actually be gaining weight that isn't muscle. The first one would be that you’re not following a proper diet. I'm sure this isn't the first time you've heard this, but you can't out-exercise a bad diet! Yes, exercise burns calories, but it also increases release of ghrelin, a hormone that promotes hunger, so you have to make sure you're balancing your calories burned with calories consumed properly. The best way to do this is to keep a food diary.
Remember, it took time for you to put on the weight, so it's going to take time to lose it too. Making sure you're getting enough sleep too! Don’t give up! Give your unexpected added pounds a couple of weeks to work themselves out. If they don’t, step back and see if there’s any other aspect of your life that needs fine-tuning.