This side effect can only be experienced if you take a hormonal birth control method. Barrier methods and natural family planning do not interact with your hormones, and therefore there is no way this symptom can appear.
Anyway, there is no conclusive proof that hormonal birth control methods can make women gain weight. Some women have even reported experiencing a weight loss after starting using the pill or the vaginal ring, for example.