As far as gaming is concerned, probably speed trumps cores in almost circumstances.
BUT, when you get to utility and real world usage there are a lot more factors.
People multi-task, even while gaming. Lots of people record and stream. Have dual screens maybe playing a video or music in the background.
I would say speed has a slight edge in the core case of strictly gaming, but when you introduce gaming+multitasking and/or any sort of media editing or content creation, more cores are better. And they are increasingly trending to be more important.
I would say overall, the CPU speed only gives you mild benefits in the extreme upper-end of gaming performance where the GPU is really most important. In other areas, in CPU intensive tasks, more cores perform better than less cores at significantly higher clocks.
Of course there are outliers in both areas, but as you are talking strictly gaming, I think the answer is CPU speed is only important up to a point, and scales poorly cost/performance, in most scenarios.