the iphone camera is pretty good, i wouldn't discount it. don't forget that on the iphone you might be able to control shutter timer, exposure, white balance and focus in some apps. on the gopro you can only lower the max iso, afaik. and even this can still lead to overexposure in some parts of the image.
the iphone also got image stabilization and you can connect external gear for audio input. but it has a weaker codec than the gopro, so the quality of the gopro in terms of compression will be better (probably not for 4k video).
advantages of the gopro: rugged, wide angle lens, lots of accessoires, dedicated camera (you can change battery, memory, operate it with the press of a button)
so it depends on what you use it for - i'd rather use an iphone for documentary or fiction work and a gopro for long recordings or sports-action footage (and rather a "real" camera for both)