If you do a media export, export as H.264, then that will bring up Adobe Media Encoder window. Before starting the encoder job there, change the encoder to Animated GIF. You can also set the output render size etc as well if you need to scale the image down.

If you click on the second column (mine shows "Animated Gif (Match Source)" above) you can change the settings. If you want to change the resolution, quality etc you can change it here. (You can save presets as well if you want to reuse them.) If you don't want to match source, untick the checkbox next to the width and height settings.
