In order to match Gravatar account and wordpress account name one need to perform below mentioned steps:
1) Log out from Gravatar and WordPress login.
2) Now, log into WordPress with the username one would like to match with Gravatar account name.
3) Log into Gravatar with the user details associated with that account.
4) Add the email associated with that account to Gravatar account.