Like the others said, your ram is clearly the issue here, you need a 64bit windows to use more than 4gb ram.
Also, your CPU has i3-4150 has 3.50ghz base frequency which should be more than enough for Photoshop.
GPU will help if you need the features that make use of GPU power:
Any decent GPU will do if you're not using those features, but then again, if you are running on a low-end on-board graphics, even windows ui will not run smoothly, so...
RAM will help with Photoshop's "cache", if your ram is not enough, Photoshop will resort to use "scratchdisk" instead, something like pagefile and relies on Harddisk speed, that will have a huge impact on performance unless your running off ssd, which should help a little bit. Like I said before, editing high resolution photos will fill up the ram pretty quickly, how much ram you need depends on your workloads, it's better to observe yourself.
CPU is also important but as long as you meet its system requirements you will be fine. Again, better CPU will speed up processing time, like when you apply filter/effects/etc, a good CPU will shorten the time it needs to process.
I think in my case I'm working with quite loads of layer images - which component shd I focus? RAM or CPU ?