mid-14c., in the Church sense, "a freeing from temporal punishment for sin, remission from punishment for sin that remains due after absolution," from Old French indulgence or directly from Latin indulgentia "complaisance, a yielding; fondness, tenderness, affection; remission," from indulgentem (nominative indulgens) "indulgent, kind, tender, fond," present participle of indulgere "be kind; yield, concede, be complaisant; give oneself up to, be addicted," a word of uncertain origin. It is evidently a compound, and the second element appears to be from PIE root *dlegh- "to engage oneself, be or become fixed." The first element could be in- "in" for a sense of "let someone be engaged" in something, or in- "not" for a total sense of "not be hard toward" someone.
Sense of "leniency, forbearance of restraint or control of another, gratification of desire or humor" is attested from late 14c. That of "yielding to one's inclinations" (technically self-indulgence) in English is from 1630s. In British history, Indulgence also refers to grants of certain liberties to Nonconformists under Charles II and James II, as special favors rather than legal rights. The sale of indulgences in the original Church sense was done at times merely to raise money and was widely considered corrupt; the one in 1517 helped to spark the Protestant revolt in Germany.