As the song says, "All I'm askin' Is for a little respect".
Pet owners often tell me that, in preparation for having a baby, they have started pulling tails and ears in order to get the dog "used to it" before the baby comes. The dog is not 'getting used to it" but is simply tolerating something that is annoying, uncomfortable and may even be painful. It may even increase their anxiety.
Tolerance only goes so far, tho, and then a dog may decide enough is enough. If someone was poking you with their finger how long would you tolerate the behavior before finally reacting? You can say "stop" but a dog can only say it thru body language before they eventually resort to biting. If you aren't going to stop your child from pulling the dog's ears then separate them.
How does Fido say "enough, I'm not comfortable with this"? You may notice the dog licking you and/or the baby. Yawning. Very round or "whale eye" (where the white is quite visible). Lip licking. Ears pinned back. Tail tucked. Body shifts away. Whining. Lip lifting / showing teeth. Growling. These are all ways the dog is telling you they are not comfortable. What should you NOT do? Punish the dog who is trying to tell you there is a problem. Respect your dog and teaching your child to respect the dog you will help you protect them both.
A false sense of security can develop when a baby first comes home. The dog may be curious and even want to be near this new bundle that is taking up so much of your attention. You let your guard down, feeling a sense of relief that Fido appears to be accepting the baby. The baby, tho, is pretty stationary at this point. As months pass and the baby becomes more mobile, as well as more curious about the dog, Fido's anxiety can build. Baby's are unpredictable and some dogs don't handle this as well while some may tolerate for awhile but may eventually say "enough".
What SHOULD you do? Institute a very strict supervision and separation plan. Try to keep yourself positioned between the child and the dog, offering treats to the dog. Use stuffed toys to show the child how to pet the dog and make sure you are always there. Teach them to never put their face near a dog's face. Don't leave them alone for a moment as a quick run to another room to get your phone or a soda or that project you were working on could spell disaster, remember dogs and babies are FAST. They only need a moment for something to go wrong. When separating the dog be sure not to make it a punishment. It's a great time for the dog to enjoy a snuffle mat, stuffed Kong, or a favorite toy while in their own space.
Hire a reward based or Fear-Free certified trainer who is experienced in behavior challenges, a behaviorist or Veterinary Behaviorist to work with your family and the dog. Talk to the vet and make sure there aren't any physical causes for the dog to be anxious. Even a small tug on an ear or tail or the pat of a hand or a toddler climbing on the dog could be painful for an arthritic dog, prompting the dog to be less tolerant.
It's our job to protect both the child AND the dog. The bond between a child and dog can be wonderful but it needs to be safe.