To be honnest AE and AME are not to great tools for exporting GIFs, but if you have AE you already probably have Photoshop also - and that is the way to go.
So:
1.
a) prepare your animation in AE
b) export your animation using AME to f.eg. h.264 mp4 file
c) open PS

d) open your mp4 animation in PS
e) use File/Export/Export for Web
f) there chose gif format, your color settings, and if you wish your animation to play ones or loop
g) then export
Voila!
Second way is to use paid scrpt inside AE called GiFGun GifGun - aescripts + aeplugins - aescripts.com
And one other way is to use some online gif converter f.eg. Free Online Animated GIF Maker - Make GIF Images Easily