Slowly. When we brought our son home from the hospital, we gave our dogs a baby blanket that he was wrapped in so they could sniff him up. They were more curious than anything, so little by little, with supervision, we would let them sniff and lick him, soon thereafter they cured their curiosity and were bored with him, and went about their merry lives. Til this day, they are great with both my children, but are never left alone or unattended with either. An animal is an animal no matter how much you may love or trust them, they can snap in a second.
Before we brought our girls home, my husband came home with some clothing the baby had worn. As soon as we came in the door, we let the dog sniff the carrier then the baby. She is a very sweet, but very big dog....don't know if HOW we did it made any difference, but she is excellent with the girls at all times. We also were careful to spend a great deal of time with her when we first brought babies home so that she didn't feel slighted or jealous....so far so good...six years later=)
Slowly and never ever leave baby or toddler, or young child alone with the dog or cat. My dogs and cats kind of ignore baby.