Sure, the largest difference is the graphics card. Workstation graphics cards often have ECC (error correcting) memory and are optimized for stability and accuracy. Gaming graphics cards have similar hardware, but with non-ECC memory and optimized for raw FPS. You won't get quite the same performance from a workstation class card with similar hardware, but it will work fine.
The processors may be identical, but if they aren't, the workstation is likely to have lots of relatively slower cores than the gaming machine which will have a moderate number of relatively faster cores.
All of this is very general of course, but the bottom line is that a workstation type PC will run games fine but might not have quite the performance even with 'more powerful' hardware.