It really depends on the animal, you should have a good feeling for it after you observe them together for a while, animals may step on a newborn, or knock over an older baby not realizing what they are doing. When the child starts to move, you have to be careful for the baby not to pull hair, ears, and bite, so the dog doesn't retaliate.
This situation is greatly affected if the pet has been in the family for years. Animals will feel they are part of the family and will expect to be treated equally, as the new baby. It is always advisable to let the animal know that, now things have changed. This is your baby, the one you want to raise until you're old and need him/her to take care of you and cherish you. If you do not do that, the animal will defend its "seniority" and can definitely attack your baby.
Ask for help in your local veterinary office, or SPCA. I heard that its best to introduce a pet into a home when the child is old enough to understand to "stay away" from the animal depending on the situation. Generally when your child is 3-4 years old you can successfully introduce a young pet into the family.
NEVER leave your child alone with the animal! People hear all the heroic stories about pets saving babies, and people's lives in general; and they assume all animals are safe. However, the injuries caused by animal bites exceeds the times an animal has been reported to save someone by at least 90%.
More information: "dogs bite nearly 2% of the U.S. population -- more than 4.7 million people annually"
Several recorded deaths of children under the age of 5 caused by dogs:
- July 2006, 3-year-old Mariah Puga of Hargill, Texas, was killed by her parents pit bulls.
- On October 3, 2006, 2-year-old Julius Graham of Greene County, North Carolina, was killed by a Rottweiler.
- On November 3, 2006 two-year-old Ariel Pogue of Tallapoosa County, Alabama, was mauled to death outside her home by one of her parents' three Rottweilers, in the presence of her mother.
- On November 4, 2006 one-year-old Allen L. Young died after he was mauled at home by his dad's four pit bulls, which took the boy from his bed at night.
- On November 6, 2006 two-year-old Luis Fernando Romero Jr. was killed after being mauled by two Rottweilers at his home near Tucson, Arizona.
- On September 22, 2008 15 day old newborn baby was killed in northeast Ohio after being attacked by the family's husky dog as she was lying in a bassinet. Read more here: http://www.wsbt.com/news/regional/29492299.html
More statistics about homicide dogs: http://www.dogbitelaw.com/PAGES/danger.htm#homicides