Sometimes children make animals very nervous because the animal doesn't know what the kid is going to do. It could also be a show of dominance. Dogs will hump each other to demonstrate dominance, so watch for that (dog language is really weird). It's good to correct the dog when it's doing that, not by yelling but by using your outstretched fingers, made stiff, formed in a bit of a circle and sort of "punch" between the neck and the shoulder, or hold it as mom would to move it: because that's what mom would do. Also, your baby may be hyper around the dog and that could be something to watch as well, which goes back to the trust issue.
Good luck.