There was an error connecting to Apple ID server

Solution 1:

Old question: new answer. Today I had the same problem on my iPad mini. It turns out that a prior troubleshooting solution was to manually reset the date to an earlier time. My date was 4 years (yes!) off. I went to settings and changed to my iPad time to "set automatically" and everything worked. Other symptoms besides this included the search function in the app store never returning any results. That was also fixed once the correct time was set.