Gaining too much weight!

Desiray • Proud carrier of a beautiful babygirl.
Pre-pregnancy I weighed about 145. I lost weight the first month and few weeks and went down to 138 due to morning sickness I'm guessing. Month 2-4 i gained about 3-5lbs each month. I gained about 10lbs the 5th, 6th months. At 6 1/2 months my doctor told me I needed to start walking everyday. Then turns out I'm anemic. I'm 7 1/2 months and gained another 10lbs. In total I've gained about 40lbs or more!! I've been eating right and getting some excercise when I can but it's hard when it's hot outside and I have to watch a little kid half the time. I'm just worried I've gained way too much and my doctor is going to be mad. Anyone else have a problem with gaining too much weight?