Or possibly getting the HOA dissolved. My in-laws were in an HOA when they moved into their house. The neighbors all agreed that they didn't like it so they dissolved it. Not likely to have that happen if you're in a gated community though. Some people are all for HOAs because they keep their neighborhood looking nice. It's also fair to note that HOAs can enact new laws and you could be grandfathered in. At any point in time they could just say "yea...we don't like chickens" and then ban them. I'm not a fan of the overreach myself but I will say that they keep your house value up. We're not in one and the neighbor across the way has dropped our property value simply because of how unkempt his property is. I don't plan on selling anytime soon but if I did I'd be very irritated by that. I grew up in an HOA and it was nice because it encouraged people meeting and knowing their neighborhood. But...we couldn't have chickens.HOAs tend to be largely ignored by the members, unless they are being fined at the time. Nobody considering a career in public office begins that effort with their local HOA. That means there are few who seek HOA office, and the elections typically have very low turnout.
Your best chance at amending the HOA bylaws to allow a small number of poultry is to get a seat at the table.