Thank you for the reply.
No, I don't have any special characters in the password. I used the US keyboard layout (default) while typing the password on the console.
I hadn't tried connecting to the host directly using vSphere client. I did this, and I was asked to download and install the client for ESXi 5.1 (VMware-viclient-all-5.1.0-786111.exe). Even after installing this new client, I am getting the same error. What could the issue be.