I am a dietitian and strength and conditioning coach, and have worked with special populations such as expectant mothers. I can tell you first hand that most(not all) OB/GYN do NOT have extensive background in either nutrition, exercise physiology, or anything of the sort. They are only required to take a few hours in their studies.
That being said, most do not keep up to date on the most recent and most peer-reviewed studies. It is so necessary for moms-to-be to remain active especially if you were already active. I'd not recommend starting a new strenuous program if you've never worked out before, but SOMETHING is better than nothing. An evening walk, yoga, light weight lifting if you've never done any or even just bodyweight exercises - it's all so helpful for you, baby, and giving birth.
This obviously does not include moms with special medical conditions!