Harvard's authentication system will allow you to try again in two hours. However, if you enter an incorrect password again, you will be locked out for another two hours. Depending on circumstances, it may be faster and easier for you to request a new password; follow this link to request a new password for HarvardKey.
If you find that you're getting locked out frequently, it may be because you're not sure about which login type gets you into which application, and therefore entering a password for the wrong login type. You may want to check this itemized list of applications' login types, organized by School.