GIFs only support up to 256 colours. This is why your quality is degrading. There is no way around this.
The format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space.
If all you need is transparency, consider a PNG (Portable Network Graphics) file. It supports a much wider palette and proper partial transparency (alpha channel).
PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK.