… Here’s how I got back in.
I have two-factor authentication enabled on my Apple ID to help keep unwanted visitors out. It also kept me out of FaceTime and iMessage, though everything else worked fine, until I realized what was going on.
Two-factor authentication allows the user to create app-specific passwords. This is so that an app that wants you to sign in using your Apple ID can’t then access your entire account. Apple’s two communication services (but not iCloud or any other services, oddly) require app-specific passwords when two-factor authentication is enabled: FaceTime and iMessage won’t work without them. It seems that these passwords time out after a few months, because the Mac I was signed into wanted my password again. You can’t view an app-specific password on your account; you can only delete the old one and make a new one. So I did that, and the Mac was happy.
But when I tried to send an iMessage from my iPhone, it didn’t work. I tried signing in (Settings > iMessage > Use Apple ID) with my Apple ID and password to no avail. (Wrong password? Kidding, right? I typed it in five times perfectly!) After musing over the problem for a few days, I decided to try making a new app-specific password and sign in with that … and it worked! It certainly was frustrating. Instead of saying my password was incorrect, it should have suggested that I go make an app-specific password instead and try that. Anyway, the problem is solved, and if you have had this issue, try this solution.