It seems that there is a communication issue between the Apple and the wifi you are connected when this problem is present. I also had this problem on my iPad and tried hard reset and clock settings etc. but eventually I got through just by joining another wifi which I just shared from my mobile and voila. Hope this helps!