Sounds like you are exporting the unrendered frames.
Try this, which will render each frame as an image which you then load in to a new document and create your GIF.
With the timeline showing the 3D animation click at the top right of the timeline and in the menu choose Render Video.
Set it to Render to a Photoshop Image Sequence and choose a folder to render the frames into.
Use png as the format and set Alpha Channel to Straight- unmated. That will render each frame with transparency.
Go and get a coffee whilst it renders each frame.
Then you just need to use File-Scripts -Load Files into Stack to load the images into a new document as layers.
Finally create a Frame animation in the timeline - Make Frames from layers (to load the layers into each frame), set the duration for each frame and Export -Save for Web to create your GIF
I hope that helps
Thanks, that jelped. However, one I export this into a gif, the edges keep appearing pixellated. Probably this is a limitation of the gif format.
GIF does have limitations but there are settings in Save for Web which can help. With GIF and transparency you need to tell it how to treat the edges. For example will it eventually be set against a black background or against white.
In Save for Web look at the Transparency and Matte settings whilst viewing the preview to get the best for your image and it's intended use.