I have found this to be a problem with "Restrictions" on the iPhone and having changed an Apple ID Password.
I first encountered this after I received an email saying one of my trusted devices had been removed. I'm not sure whether this is due to running the public beta software on my iPhone or not. It only started happening since using iOS 9.3... Anyway as a result I logged into my account and changed my Apple ID Password since I had not removed it from my trusted devices.
Also of note, is I have restrictions running on my iPhone that prevents changes to my location services and accounts.
Once I change the password, I have to update that in the iCloud Preferences window; this leads to the never ending spinning / loading wheel.
The way I solved this was to force quit that. Sign into "Restrictions" under "General" in my iPhone and check the box that says "allow changes" under the accounts menu. This also pops up a window that says "iCloud Terms of Service" have changed and you have to accept them. Once you have done that open "iCould Preferences" on your mac and sign in again and this time it should work correctly after a couple of seconds. After that you can change the account settings in your iPhone back to whatever they were.
Does anyone know whether this issue - the iPhone being removed from a trusted device - is because of the beta software? It hasn't happened until iOS 9.3 public beta.
Hope this helps!
Thanks,
J.