In practice, attacks are much more important than IV, those however can be changed through farming TM's. For defenders, I would say IV are almost completely irrelevant. Anyone can beat a gym regardless if you left a 100% Blissey in it or not. For attackers, I would say anything with a 15 atk IV is worth powering up to 30 if it's meta-relevant.
Perfect mons really only matter when you get into solo t3 / duo t4 / trio t5 territory. When surviving an extra attack round or doing 2 more dps actually matters.
A longer explanation would include a discussion on breakpoints, where a 15 atk monster might only need to reach level 30, but a 10 atk might need to be level 35 to do the same damage. That's a lot of extra candy and stardust investment.
Best case scenario is finding a weather boosted Pokemon with good IV. Boosted monsters can go up to level 35 in the wild (if player is at least level 33).