An employer can specify the gender of a job if having a particular gender is a bona fide requirement of the job. For example, if you are selling women's clothing and need a model to wear the clothing, then obviously you need a female model. However, if you are hiring an accountant for your business, the gender of the accountant is irrelevant. It would not be easy to get past discrimination laws with the excuses that you suggest.
My answers to questions posted on AVVO are intended to provide general information only, and are not intended to be legal advice. Employment law issues typically require a careful case-by-case analysis. Consequently, if you feel that you need legal advice, I would encourage you to consult in person with an employment attorney in your area.
You may find that this article helps to increase your understanding of the gender discrimination laws: http://blogs.findlaw.com/free_enterprise/2009/04/can-men-be-hooters-girls-when-can-businesses-hire-only-women.html
This answer does not constitute legal advice and you should contact an attorney to confirm or research further any statements made in this answer. Any statements of fact or law I have made in this answer pertain solely to New York State and should not be relied upon in any way in any other jurisdiction.
The answer is that it depends. If the gender of the applicant is relevant to the job offered, then it can be a term of employment.
As to the lawsuits by the ACLU, I'm pretty sure you would need to worry more about the EEOC (Equal Employment Opportunity Commission) than the ACLU, since the ACLU would be suing as a plaintiff, while the EEOC is the actual government body charged with enforcing the federal discrimination laws against employers.
You should also be aware that under limited circumstances, you have the ability to structure your requirements for employees to INCLUDE gender preferences for male or female....in order to find out what those circumstances are, I suggest you consult with an employment attorney.
This does not constitute legal advice or the engagement of my services as an attorney.