Two words with opposite meanings are referred to as antonyms. A word that is the opposite of itself (no, I'm not making this up) is called an autoantonym or antilogy or contranym. Let's look at a few examples:

  • lease (verb): Means to lend or rent out. Can also mean to borrow or rent for oneself

  • oversight (noun): Can mean watchful care as well as omission

  • root (verb): Can mean to remove completely (as in to root out) as well as to become firmly entrenched (as in to take root)

See my entry on Wiktionary for autoantonym.