Weight gain, from taking birth control pills, has been proved a myth by multiple studies in the last decade. If on a pill and you notice a slight weight gain it might be a temporary side effect (that will go off in 3-6 months) or you need to consult with your physician about changing it. Birth control pills are either progestin-only pills or combination pills, which contain estrogen and progestin. The chemical composition of estrogen is said to be constant across most pills and it is the progestin that varies across brands. So a change in pill might solve the issue. Make sure you give any pill at least three months for any side effects to pass.
Estrogen based pills stimulate renin-angiotensin compounds in the kidneys that can lead to fluid retention. So if you want to avoid these issues change to pills with <20 mcg of estrogen content. Oral contraceptive pills are known to elevate insulin levels that cause energy from carbs stored mainly into fat cells. So if you are on a strict diet plan, the pill will prevent the “intended” weight loss.
The only possible women who are at higher risk of weight gain from the pill are ones with an abnormal glucose metabolism. If weight gained >5 % of your body weight, this may indicate that you have either an abnormal glucose metabolism or insulin resistance. Your physician can help with an alternative and put you on a low carb diet.