If You activated Two Factor Authentication, 2FA, on Your devices it could be that Your old Apple TV 2 or 3 after some time wants to be in the same "club".
Two weeks after I activated 2FA for my other devices, my ATV 2 demanded the code for 2FA?? I tried to log on to the ATV2 with my iCloud password but didn't succeed.
In the same article mentioned above, there is info for devices running older software.
"Then type your password followed by the six-digit verification code directly into the password field."