I would think that the correlation is low in general. But that is because tenured faculty get to choose, to some extent, whether to focus primarily on teaching or research rather than to both "equally". Both take effort, but a different kind of effort. And some faculty change focus over their career.
But it is certainly possible for someone to be great at both, for example, someone who can give insight into deep topics, not just detailed (pedantic?) explanations.
Using teaching ability (or a match between what they do and what you like them to do) as a predictor of their research is probably not a win for you. And, the ability to guide your research is also important along with the quality of their own.
For purposes of making a choice, I suggest you look farther than just those two "variables". How helpful they are likely to be when you need it (some research focused people are terrible at this). How successful other student advisees have been, both in their degree work and in starting their careers.
There are a lot of variables. Don't ignore other important factors.
I've known people who were excellent at both; one of my mentors. I've known people who excelled at one or the other but not both.
One example, that seems like a counterexample, is Robert Lee Moore who was both a pioneer in Topology, but also in a certain teaching method (Moore Method). His method was very effective, if you could stand to bear it. He didn't lecture and he didn't let students read mathematics. Instead he had them spend their time writing and developing math from the barest of hints. Most people would hate this, since it is very difficult, but it worked for the few that stayed with him.