Weight gain...

So between 20 to 25 weeks I gained 10 pounds. My doctor was concerned and told me to eat healthier because she didn’t want me to gain too much weight and then the baby and then to have a c section. Now I’m 33 weeks and in two weeks I’ve gained 7 pounds... is this bad!? All together I’ve gained 32 pounds. I’m 5’2 and before i got pregnancy weighed 145 now I weigh 177 and I feel like I’ve gained too much...