Dogs and baby?

Tara • Pregnant with our 3rd baby!
We rescued a shihtzu last year from animal control, his time was almost up. We fell in love with him immediately an had to take him home with us. He proved to be an amazing little dog, so patient with our kids, already house broken, and lovable. Then visitors came over... He barked and howled and lunged at them trying to bite them. He hates new people. His previous owners neglected him and when AC found him running around his fur was so matted it ripped off his skin during his grooming. I have no idea what his last owners did to him. So we were patient and understanding. Gave him tons of love and affection. My dh's family has visited often and now he loves them and even sits on the couch with them and let's them pet him. But he hates my family! Bites my step father and mom, but seems ok with my little sis. He also loves our two other girls, ages 3 and 4. But now we're trying for another baby. And I'm so scared if I actually get pregnant and bring the baby home that he will act up and pitch a fit. I have baby gates that I can keep him blocked off from the baby, but that still doesn't make me feel any better. Getting rid of him isn't an option, we saved him and he loves us, and we love him way too much to desert him like his last owners. I'm just worried. Any opinions on what I can do?