Your pet needs structure and predictability. A new baby, especially if it is your first, will disrupt your routine and confuse your pet. Your pet wants to know what to expect and what the rules are. A new baby typically means a different, and unpredictable schedule, new smells, less attention, more visitors, not to mention a new person in your home who is getting V.I.P. treatment. Remember that your pet is not being spiteful by its behavior.
Animals react instinctively to changes in their environment.
For dogs, obedience training with a qualified trainer can be extremely helpful. They will help you to better understand your pet, and teach you how you can effectively get your pet to behave in a way that meets your family's needs. Marking it's territory in your house to let the new little intruder know whose turf this is. Introduce your pet to other babies and children under your supervision. Make sure someone will take care of your pet while you are in the hospital giving birth.