In a game that is well optimized for multithreaded performance, then yes, a CPU with more cores will offer substantially better FPS than one with fewer cores.
However, that's the majority of games these days. The number of games or applications that ONLY perform better with a CPU that has stronger single core performance is shrinkly week by week. Plus, if you have any CPU from the last two Intel generations or the current Ryzen generation, then you're probably already maxed out as far as single core performance is concerned EXCEPT if you want to include the additional performance gained by overclocking the CPU which will obviously have an impact on the single core performance.
And it definitely matter what graphics card you're using because if the CPU is powerful it won't matter much, you'll still get slow performance because most of that power will go to waste as the CPU will be waiting around for the graphics card to feed it rendered frames. Balance is the key, and an understanding of what expectations you should have based on the level of performance your hardware is capable of delivering even when it is balanced. For example, just because you have a balanced system consisting of an i3-8100 paired with a GTX 1050 TI doesn't mean you can expect the same level of performance as a balanced system consisting of an i7-8700K with a GTX 1080.
Both are well balanced, without really having an obvious bottleneck, but one is going to obviously offer much better performance than the other because it is simply more capable. Now, that being said, you might be able to match the FPS of the higher spec system by lower the quality settings with the lower end hardware, but clearly that is also going to seriously reduce the visual satisfaction you get from the game and if you're ok with that, then the lower spec system is an option, especially if you're at a lower resolution as well because as we know resolution is going to have an affect on performance too. It's like Mr. Miyagi said in The karate kid. No have balance, no have nutting.
Even so, when given the option, I usually opt for getting either a better graphics card or better CPU, IF I know I am going to be able to upgrade the other component sometime in the near future to balance things out or for example if I simply want good graphics because the kinds of games I play are maybe not as reliant on high FPS because of the type of game they are. In that case, I'd lend more weight to the graphical ability of a good card than I would to the faster performance of a higher tiered CPU.
And I'll stop there because it's going to look like the proverbial snake eating it's tail if I keep going.