The real problem, as I see it here is that the dog's owners or at least one of them, regards the animal as a substitute child.
This being so, there is no way you could have tackled the issue of the dog without offending them.
If you decide to invite them again, I suggest you make it very clear that the invitation does not include the dog. That will probably make them refuse to come.
If they turn up with the dog, aske them to leave it in the car.
There is unfortunately no way you can get them to see your point of view, so I am afraid you probably have to put up with the dog if you want to see them. If you decide to invite them on their terms rather than yours, do so when your grandchild is not going to be there, because as you quite rightly say and old dog and a toddler is a very poor combination. You would never forgive yourself if the child was bitten.