Hard to compare, as you're comparing two cars from different generations really. They stopped making the E36 M3 a few years before they started making the GTA (correct me if I'm wrong).
The real comparison for the GTA would be the E46 M3. I would choose the E46 M3 over a GTA every time.
Problem with the E36 M3 is it looks so dated now, where as the 156 design is almost ageless and still looks fresh 12 years later. I don't mind the look of the E36 M3 exterior too much as it looks a bit "old school" now so kind of cool, but I just couldn't live with the interior, when you compare it to a GTA interior....
The E36 M3's don't look very special either, I'm pretty sure one could pass me without me noticing. And to those who don't know much about cars it could just be an old BMW, where as I'm sure the GTA would get loads more attention.
If all you care about is performance then the E36 M3 would be the choice. But as said by others, for all the moments where you're not driving it flat out, the GTA is the better car.
Also depends on how much you're spending. If you're spending 4k, then you can buy an M3, but not a GTA, so there's no choice.