This article explains the general rules for reducing the file size of GIFs on your website, making images load faster and your website run more efficiently.
How to Reduce the File Size of a GIF Without Losing Quality – Adobe Photoshop CC Tutorial
To make your GIF as efficient as possible:
Crop any extra space around the image. Reducing the pixel dimensions of an image is the most effective way to reduce file size. If you're using Photoshop, the Trim command works well for this.
When you prepare a GIF image, you reduce the output dimensions. Each graphics editing program offers different commands for resizing.