Oh, dear, whatever you do now will probably put you in the wrong!
Try to keep in touch with your daughter by all means, but only speak to your granddaughter if her mother knows you are going to do so. I know this sounds harsh, but apparently your daughter's boyfriend is running things right now.
He sounds like a controlling, possible abusive man, but as long as your daughter is in love with him, any criticisms you make will only put her back up , and his, as she will no doubt tell him what you said.
If it is possible to speak to your daughter alone, ask her what you have done to offend her boyfriend as you are at a loss, but would like to put things right.
Like you, I feel this is difficult for your granddaughter, who has suddenly acquired a step-father and is being kept away from the grandparents she loves. It does not sound as if there is any possibility of the child being allowed to visit you, as this, according to her mother's boyfriend is upsetting her and causing her to misbehave at home.
Unfortunately, you can do nothing to help her, unless her mother allows you to.
I know this all sounds horrible pessimistic, but please, this is a case of least said soonest mended. If your daughter's boyfriend is willing to tell you what he thinks is wrong, then perhaps you can bridge the gap.
I hope so, but my experience tells me that he won't tell you what he is vexed about.
Give it time, I hope your daughter will come to realise what this man is actually doing to her and her child and either put her foot down, or leave him.