I'm sorry you are having this in your life.
I would talk with him. Explain its not on and insist on some anger management classes.
To me that's a warning, for everybody. And if it happened again, then he could go cool his heels somewhere else.

Babys do bring out the most instinctive things in most of us, and I don't believe its an excuse for what he did, but a reasonable reason. Just lacking the adult self control to not hit a small child.
Yelling in babies ear isn't a good thing to do either
I hope baby and toddler are ok after the incident. Sounds like you could all use a big hug