"Please stick a stamp on the postcard."
@torukisaki's answer was mostly correct. Hagaki comes from the word for 'leaf' (葉 - pronounced 'ha') and the word for 'write' (書き - pronounced 'kaki'). The pronunciation has been softened from ha-kaki to ha-gaki.
It can be (and often is) written in any of three ways: 葉書, はがき, and ハガキ. As は and が are frequently used particles, and there is no separation between words in Japanese, it is generally considered easier to recognize it written as ハガキ within the surrounding hiragana.
Katakana is not only for foreign loan words. In the past it was commonly used as the male-dominant written expression of Japanese phonetics.