Not really, any computer that’s using an Intel GPU will not be very powerful–they are designed for the average user and not for gaming. You would want something with a good Nvidia or AMD GPU.
Save the cash you’d spend on an Apple and build a new PC. Apple computers do not have much wiggle room for upgrades, plus they tend to really under-perform graphically.
For the $1800 or so you’d spend on an iMac, you could get that i5, the 8Gb of RAM, a cheap but functional case+PSU, a decent motherboard ($150-200), screen+mouse+keyboard, and have change left over for a high-end GPU like an R9-390 or a GTX 970.