Can't remember exactly how much I gained, because my 2 pregnancies are now ancient history! However, I was determined not to get fat, because I am vain, don't like dieting and had to get back in my work suits quite quickly.
I found a "your pregnancy this week" website which had an acceptable weight gain calculator, and made sure I never for exceeded the guideline weight gain; I just ate normally, but made sure I got enough lean protein and vegetables. I was back to my pre pregnancy weight a few days after the birth, as soon as the extra fluid had gone.
I guess this is what people like the Duchess of Cambridge do. Before I get flamed for being smug/insensitive, I would add that I accept that I started from a good position- no food issues, tall and slim to start with, no psychiatric or social issues. (save that I was doing a very demanding, long hours job and worked very close to my due date).
In the absence of any problems, you just need to realise that your body needs only a few extra calories per day -you'll need to check, but I think it's about 80- to have a healthy pregnancy. If you are able to manage that, your weight should look after itself.