No length of time is too long for an employment gap. As long as you can demonstrate you have the skills and qualifications needed for a job, no employment gap is so long it makes you unemployable.
However, be prepared to answer questions about your employment gap. The longer a gap is, the more likely hiring managers are to ask you about it.
If you have a long employment gap, explain it (without going into too much detail) in your cover letter. Most employers will be understanding if you can provide a good reason for being unemployed, such as raising a child, taking care of an elderly family member, or working on a personal project.
If you work in a fast-changing industry, such as technology, a gap in employment of a year or more may prove to be a bigger hurdle. Remedy this by showing that you’ve kept up-to-date with the latest industry trends and developments, and any related technical skills.