These two words both come from roots meaning “not-equal,” but their meanings are different.
Inequity means inequality in terms of justice, power, money, or other issues of social, economic, or political equality.
We must pass laws to combat the inequity of salaries for women versus men.
Inequity differs slightly from inequality; inequality has mathematical meaning, such as the inequality, 3 > 2, while inequity emphasizes unfairness and injustice.
Iniquity means “wickedness” or “sin” and is a little archaic; it sounds humorous if used in common conversation:
The old priest complained of the young people’s iniquity.
A den of iniquity is a cliché meaning “a place full of sin” and might be used by an old priest to describe a pub or a brothel—but it is used more often satirically, then seriously, these days.