No such thing as a high quality animated gif if high quality means more than 256 colors and anti aliasing.
If you want to create a better looking animated gif in After Effects then you render a lossless movie from your composition and then use Photoshop or another app to turn the movie into an animated gif.
If you want to import an animated gif into AE then what you see is all there is. Gif's cannot contain more than 256 colors and anti aliasing is terrible to non existent.