mid-15c., "act of inviting, solicitation," from Latin invitationem (nominative invitatio) "an invitation, incitement, challenge," noun of action from past participle stem of invitare "invite, treat, entertain," originally "be pleasant toward," from in- "toward" (from PIE root *en "in").
The second element is obscure. Watkins suggests a suffixed form of the PIE root *weie- "to go after something, pursue with vigor" (see gain (v.)); de Vaan also traces it to a PIE form meaning "pursued." Meaning "the spoken or written form in which a person is invited" is from 1610s.