Both ;)
You need RAM to hold the data - polygons, textures etc. More ram will allow you to show more detailed textures and run at higher resolutions.
You need a good GPU to do all the calculations needed for a modern game - lighting, physics etc. The better the GPU the more of these calculations you can do so you'll get better effects and it will have an impact on the resolution too.
Check the specs of those cards and then you need to decide what's important - resolution, effects etc. and go for the card that's better at those things.
Whilst many people will tell you that a graphics card is the most important component for gaming, it is not strictly true. The truth is that the balance of components is the most important.
In your case, anything but a modest graphics card will be overkill for your system. Even if you had a top of the range graphics card, you wouldn't get much out of it, because you are severely limited by 1GB of (relatively slow) RAM.
Should you upgrade your memory, your CPU will become the limiting factor - and in certain games, the CPU will prove even more of a bottleneck than your RAM.
A single 7200rpm SATA drive isn't particularly speedy either, but you are some way off it becoming a limiting factor. Faster HDDs will enable you to load levels faster, but have far less impact on frame-rates and graphical quality.
However, in a system where all components are of a similar generation, the first component to upgrade would be your graphics card. As a rule of thumb, I might suggest you keep your components within one generation of each other.
Your PC would be regarded as obsolete, but that isn't necessarily a reason to write it off. What is does mean is that buying a gfx card one generation ahead of your current one, doubling (or perhaps even quadrupling) your RAM and upgrading your CPU by one generation would be cheaper and would yield a far greater improvement than buying a latest-gen gfx card.
Best Answer
RAM starts to matter as soon as it runs out.
When a game has to process more information at once than fits into RAM, it has to use "virtual memory". That means that any data which is supposed to be in RAM is instead written to a file (the "pagefile"), and then read back when its needed. Files are a lot slower than RAM, even when you have a fast SSD. This swapping back and forth to the pagefile can become a real performance hook. Usually your operating system will move data from RAM to the pagefile which isn't needed very frequently at the moment. It will usually start with the data of programs running in the background, like any web browser windows you have still open but don't interact with right now. But when that's not enough, it might start to page data which belongs to the game and needs to be accessed every frame. As a gamer you really don't want this to happen while you are playing, because it will really bog down your framerate.
Memory is usually managed by the operating system. But when the programmers of the game are diligent, they might try to detect how much RAM they have available and make the game behave accordingly. One way is to automatically scale down or switch off features which require a lot of RAM. Like spawning fewer vehicles and pedestrians when low on RAM. Another is to change the way how a game is calculating things. There is never just one way to do something in software development, and often a programmer can choose between a solution for a specific problem which take a lot RAM but little CPU, or one which needs a lot of CPU time but a small amount of RAM. Sometimes a programmer might implement both algorithms to solve a certain problem, and then have the game choose at runtime. When there is plenty of free RAM available, it uses the fast algorithm. And when RAM is scarce, it uses the slow algorithm, because it's still faster than running with virtual memory.
But if a specific game does not already use all the RAM you have available, then upgrading to even more RAM is not going to have any perceivable effect.
When you want to know how much RAM a game is using, open the Windows task manager while the game is running (Ctrl+Shift+Esc), click on "more details", go to the "Performance" tab and take a look at the "Memory" graph. When it's constantly far below 100%, then upgrading your RAM is unlikely to improve your game experience.
By the way, the task manager can also be used in the same way to check how a game utilizes your CPU, so you can get a hint if upgrading the CPU might improve your FPS. The default task manager unfortunately does not tell you the utilization of GPU and GPU-RAM, but there are 3rd party programs from the GPU vendors which can be used to monitor these.