Regardless of which way things happen for you, it seems the best approach is not to enter the password in the first instance but go straight to a trusted device and generate a code yourself (Settings ➔ Apple ID(Top) ➔ Password & Security ➔ Get Verification Code) and then enter the password and code as suggested above (ABC123)
Thank you. This worked, but set off a nightmarish cascade of iCloud password requests across all my devices. Plus, it turned off iCloud Keychain on all devices and Back to My Mac on my computers. Every device had the following message:
Some account devices will not be available until you sign in again.
On my two iOS devices I had to enter my iCloud password to "Update Apple ID Settings" and then again to turn Keychain back on and again to turn Back to My Mac on. I also had to enter the device PIN.
On my computers, I also had to enter my password three different times. Thanks to Google for Chrome Remote Desktop so I could do this on my iMac at home. (I'm away at the moment.)
I was never able to turn Keychain back on for the MacBook Air. It said I had to request permission from another device I did that, but none of my devices ever received the request.
I would say that in the course of fixing this iCloud problem with the MacBook Air I ended up having to enter my iCloud password nearly two dozen times across two iOS devices and three computers.
This is ridiculous.