Map any string to your Mac Keyboard (globally)
This is more than possible with paid apps like TextExpander and Keyboard Maestro (which are two excellent apps that are great times savers beyond what you're looking for).

Another free option: set up a keyboard shortcut in the preferences pane such as ggh --> mypassword and then you save a few keystrokes.

And another free option which does exactly what you're looking for can be found as the first answer for this SuperUser question. 

Note that storing passwords like this is considered insecure.