Usually, the church’s teaching is that a child should not be baptized if it is against the will of the parents. However, in cases of danger, every Catholic has the right to baptize a child, even if it is against the will of the parents because through baptism, the child receives a beatific vision from heaven, the greatest happiness which God can give to human beings.
We have to desire this for every human person, in this case, this innocent child. On the danger of death, a child should be baptized, even if it's against the will of the parents, if this is possible. But if the child is not in danger of death, in this case, the grandparents or other relatives should speak with the parents or wait for another opportunity.
Or, if this could be done secretly, without causing scandal to the parents, I also think that the grandparents of other relatives could baptize the child by themselves. Make sure that this child will be united to Jesus Christ and will be free from mortal sin.
Dear visitors of Gloria Dei and all who have already written or who will write a personal message to me. I am grateful for your attention, your kindness, for your spiritual support and especially for your sacrifices and prayers for me. God may reward you!