Your question was about FCP.
Tom's reply is, as usual, correct. We can't know if you have Compressor unless you tell us.
You can't export gif with FCP alone, you have to create a Compressor setting - and actuall have Compressor - to do it.
Most people who have FCP don't have Compressor, and so the answer to "how can I export gif from FCP?" is "you can't" since it is assumed that the question implies using just FCP.
Now, you could say: "I have FCP and Compressor. How can I export gif from FCP?"
The answer is "Create a Compressor setting the way you like it, add a destination in FCP using "Compressor Settings" and use it in FCP".
Make sure that the render format for your project is 4444, so it includes the transparency.
The result GIF file will honor that transparency.