Late response but what helped me on my Mac was doing the following:
iCloud.com
Choose "iCloud" icon
Manage ID
Sign in again on the redirected page to iCloud
Scroll down to "Devices"
Choose the device that is giving you that error and select "Remove from account"
After you have removed the device you can go to "system preferences" and login again with no problem.