Blender uses CUDA for Nvidia cards and OpenCL for AMD cards. Modern iMacs should be able to render with GPU if they have dedicated Nvidia or AMD GPUs. The best ones for the job would be the 27" models with GeForce 780M (if you can find it, these models are no longer sold) or the ones with Radeon R9 M290X and M295X GPUs (the current 5K iMacs)
However, finding a used old model Mac Pro with desktop GPUs would probably be the best solution for Blender.
On the other hand, you can outsource rendering Blender farms for cheap on the web and have best rendering speeds for little money.
Hope this helps.