I just changed my Apple ID password, and then had the same problem as above.  I kept trying to sign in, then got as far as entering the verification code, and it would just revert back to the original sign in screen.  I did a hybrid of the suggestions above and it worked.  Ie, on my TV screen I entered Apple ID.  Then entered password. 
However, the hybrid step I used was to go into my new MacBook (2017 version), click on the little apple symbol, get to account then security, and found the screen that showed that I have two step verification.  Then I clicked on a button that said to send me a verification code for a new device.  The new code popped up on my MacBook.  Instead of using the verification code that was sent to my iPhone (as I was doing for the last 30 mins) I entered that new code that I requested via my MacBook.  It actually worked.
Forgive me if I sound very low-tech.  That's because I am (embarrassingly) low-tech.  But maybe this will help someone who's having the same issues.  Cheers.