Iron supplements do not cause weight gain. If you are experiencing weight gain it would be from any number of reasons. People with anemia or low iron don't feel they have energy to do exercise or even their regular daily housework type of work so they slow their pace, stop exercising and do a lot more sleeping. This could lead to weight either staying stable or "maybe" putting on a little weight, but definitely not a BIG contributor to weight gain, unless it went on for years and years of inactivity while still eating a lot.
If you are suddenly gaining weight it could be due to hormonal imbalance, low thyroid, insulan resistance, slow metabolism, wrong food choices in your diet, inactivity, malabsorption of nutrients due to poor digestion can lead to your body storing fat, parasites and yeast overgrowth are also another 2 common causes of weight gain in some people. Adrenal issues eg: cortisol and DHEA-S imbalance can lead to weight gain (waist area). Estrogen and progesterone imbalance will lead to weight gain too, predominantly the hip area.
Don't forget, constant or long term stress will affect your digestive system and you wont absorb nutrients as readily as when your life is calm. Sometimes you think you are coping well with stress, but subconsiously you are not. This is also my case i believe as i went through some major stress for some years in my pesonal life. Later i felt i was more in control and calm, but i wasn't aware how people get 'used' to living with stress and feel they are in control, but deep down stress is still affecting them and their digestion.
As you can see, most of the weight gain issues are either digestive or hormonal. You might want to find out why you are low in iron eg: loss of blood or digestive issues. Once you correct the issue then you should be much better off. I spent far too much time looking at only ferritin, when i should have been expanding my research and finding out what was causing my ferritin to start dropping in the first place.
Hope you feel well soon