Bad undergraduate grades, decent research experience, what are the chances of PhD admits?
I am writing as a American about American universities in case you want to apply here.

A Master's Degree is basically a "halfway" step toward a PhD. That is, it requires two years instead of four (or more) after an undergraduate degree.

As such, a Master's degree represents a lower risk for a university. In your case, they're dealing with a student that has a weak academic record and a strong work record. They are also, potentially, dealing with a "late bloomer."

So the feeling at a Master's Program might be, "let's see if this strong worker can fix his academic record. If he can, that's great, and he can go on to a PhD. If he has the same problems in his Master's work as in his undergraduate work, that's two years, not four that were wasted. (One year, if you are asked to leave the Master's program.)