In most cases your gun will be gone for good. I was in a situation somewhat like this years ago. I spent more that my gun was worth trying to get it back. The only reason I did get it back was my wife had a brother that worked for the states attorney. I still have the gun.
I don't agree with that as a GENERAL statement. Certainly true in some jurisdictions. Unfortunately, there are states (or counties) that routinely confiscate guns for a variety of reasons, knowing that hiring an attorney to get them back would be very costly. The state of Kalifornia comes to mind.