Normal weight gain?

My Dr. gave me grief for gaining too much weight this pregnancy. I’m 35+4 and 164lbs. I was 135 pre-pregnancy and I’m 5’6.. am I gaining too much weight? It doesn’t seem like it but my Dr. has me worried..