Gout is indeed very painful, and often difficult to treat. Step one is getting him to a vet who be able to evaluate his condition better and determine what treatments can be done, if any. If he is so painful he won't move you need to consider the quality of life, or lack thereof, for this animal. If he's living in pain he is not going to eat or drink or do anything normal and will waste away in misery. But maybe treatments will help him be more comfortable, only a vet experienced with reptiles can really tell you. Good luck with him.
I'm sorry to hear that. It is always very difficult to make that decision, but it's the one last comfort we can offer them to stop the pain. I've seen animals in pain from it and my father-in-law has had multiple bouts of gout and he says it's one of the most painful things he has ever experienced in his life (and he's been stabbed before) so I think you're making the right choice. Sorry you couldn't do more for the little guy, it's a shame people don't do the research and thus allow this to happen.
I just recently had my chameleon die from gout. It is extremely painful for them. I agree to get him euthanized I wouldn't make him suffer any longer. Gout sucks and I'm sorry you and your chameleon have to go through this