"Catch-22" is the title of a very good novel by the American writer Joseph Heller, and is the origin of the phrase. It's a bitterly satirical, black humor novel about bomber crews in World War II.
A "catch" means a trick or a deception that prevents you from getting what you expected. "This camera only costs $50." "That sounds great, what's the catch?" "We only sell it with a case, and the case costs $200."
In the novel, one explanation of Catch-22 is:
"There was only one catch and that was Catch-22, which specified that a concern for one's safety in the face of dangers that were real and immediate was the process of a rational mind. Orr was crazy and could be grounded. All he had to do was ask; and as soon as he did, he would no longer be crazy and would have to fly more missions."
A "Catch-22 situation" is one that can't be solved because of a logical contradiction. For example, you need a loan from a bank, but to get one you need to be able to prove to them that you're able to pay it back--but if you were able to pay it back, it would mean you didn't need the loan.