Unable to sign into macOS 10.10 or earlier
Just doing a FYI since the reply option was greyed out on one of the questions about not being able to sign into apple id on mac running 10.9.5.
If using a macOS 10.10 or earlier, they did not have two factor authentication then. If you apple id is using two factor authentication now, you will need to enter in the verification code that is generated on your new device behind the entered password on the mac in the password field. It's called a decorated password.
ie: password: (apple id pw)+6 digit verification code with no spaces between password and verification code.
example: Xyzpasswor9bb123456 = 123456 is the verification code example.
iMac, OS X 10.11