Your token expired or was revoked, or the password changed. Press A to reopen the connect form as "Reconnect to GoCD", enter the new credential, and you're back in, no quitting, no hand-editing the config file.
Running with env vars? Remember GOCD_TOKEN / GOCD_PASSWORD override the file, so a stale exported value will keep producing 401s even after you reconnect.