Told today I can't eat any sweets😢😢

Sierra • Expecting baby girl Evelyn, Sept. 2016❤️
I'm 22 weeks and 5 days and have gained 26 pounds.. I eat really healthy because I'm terrified to get gestational diabetes.. The big problem is I gained 10 pounds in my first trimester, probably because before I got pregnant I barley would eat anything at all, maybe one small meal a day. Since my second trimester I've gained the recommended weight. I told my midwife how much I love to bake and she said I need to completely cut out all sweets. It just makes me kind of angry that I eat so healthy all day and have been since I found out I was pregnant and now can't even have one cookie at the end of the day.. I have been trying to be active this last month also, but I just don't understand why I'm gaining weight so rapidly, when I'm trying to do everything right (expect one cookie or brownie after dinner) anyone else experiencing this??