Basically everyone is different and it's all down to being aware of what you are doing and eating and how you put on weight.
I was technically obese when I got pregnant with DC1 - just tipped into BMI 30, but actually 2 weeks after he was born, I weighed less than I had at the start (pregnant straight after Xmas - so maybe started a bit higher than normal). I didn't eat for two during and because I was already overweight, I was lucky that as a person I didn't really gain anything except water weight. Afterwards, I breastfed for over a year, which will have helped a little at not gaining too much weight postpartum.
I did however put on more weight between his 1st and 2nd birthday than I did on mat leave, because I was back at work, stressed and eating breakfast and lunch 'out' every day, with little time or energy for exercise (which I've always hated anyway).
Was the heaviest I'd ever been when DC1 was nearly 18mo, started couch to 5k and was actually enjoying it but after being ill during a week where it ramped up, I lost motivation as I was out of sync with the free group I ran with.
I reached 15st, the heaviest I have ever been - same weight as my dad.... Being very heavy and trying to exercise just wasn't the right thing for me, so I decided to do a shake diet for a few months instead, lose some weight and then start exercising again. It's certainly not for everyone, but I did a slightly less strict version with a light meal each evening and lost 3st. I had just started Couch to 5K again, feeling a lot better in myself, when I became pregnant with DC2 (only took 2 months this time, maybe because I wasn't so overweight; first time took over a year). I'm immediately lower risk, with a BMI of 28, and even at 30 weeks pregnant, I weigh less than I did at my unpregnant heaviest. We walk as much as we can (weather's not great for it), but I'll be aiming to start couch to 5k for the third time when DC2 is a few months old, not to necessarily lose weight but just to be healthier for my kids.
So - long story short (haha) - we all have different weaknesses, our bodies all respond to things differently and it's about finding whatever will work for you at the time. I know for me that pregnancies themselves don't make me put excess weight on, but that my most vulnerable time will be when I finish mat leave and start work again. So I'm going to fight against that, and start as early as I can!