MusicalFreedom is right, only applications that are multi-threaded will actually see performance benefits from multiple cores, even then that's just 3 logical cores executing different parts of the code a program requires at the same time. Otherwise, it just makes for smoother multitasking with normal programs.
The importance of the CPU depends on the game. Source games (Half life series and its derivatives, like Counter Strike and Team Fortress) are VERY CPU dependent. Others may be very GPU dependent, or a mixture of the two.
RAM is a different story. If you have enough RAM for the game to load what it needs, you wont see better performance if you get more RAM. The only time RAM makes a difference is if you're under the game's requirements, then adding more RAM will be tremendously helpful.