The saying came from the book. Joseph Heller introduced it to illustrate the fact that there was no get-out clause, in the forces or in life. The original Catch 22 stated that, if you were mentally unhinged you could be excused military service. Unfortunately, Yosarian proved that he wasn't insane since he had the sense to be scared for his life.
Of course the saying came first and obviously it originated from the mind, brains whatever you describe it as. It's only logical that everything begins from a thought, then developed into an idea.
Heller's original plan was to call his novel Catch 18, then another book appeared with '18' in the title, so he felt obliged to change it. Just imagine...we could have been referring to such situations as Catch 18 ones for the past 47 years!
There's a restaurant in Beverley called 'Bistro 22' (because their address is at No. 22). The fish menu there is called 'Catch 22'.
Just thought I'd throw it in.