My suggestion: follow your gut. Your daughter is being abused, and I understand the difficulty of getting out of a domestic violence situation. At 18, your daughter can choose to put herself in an abusive environment. But the moment she became pregnant, your daughter's legal obligation to protect her child became greater than her fear of leaving. Even though she is not the perpetrator, she will be guilty of failing to protect her child if she remains in a home where the child is exposed to domestic violence. If she cannot leave him, then I agree you have to follow your gut and contact authorities to save that baby. If you contact protective services, make sure they know you are willing and able to care for the child.
In the meantime, and always, remain supportive of your daughter - she is trapped both physically and mentally. The only "adult" romantic relationship she has had is one of abuse - it is all she knows. She will need a lot of therapy and a lot of support to get through this. On top of that, she may be in real danger if she leaves - make sure she is protected and safe. She should have received a criminal protective order which restricts boyfriend from contacting her; if not, have her ask for one. In addition, she can also get a civil restraining order. Frankly, having these orders in place - and following them - will help her immensely in assuring the child is safe in the future because it is evidence for the family courts against the father's unsupervised visitation of the child. Rest assured that if this guy is an abuser, he will want custody of his child - it is another source of power and control over your daughter.
It would be enormously helpful for you to consult with a local domestic violence attorney. Even if you just meet for an hour, the attorney can give your more specific advice and guide you toward advocates in your area. Good Luck.