First solution, don't try to make animated gif (256 color) from jpg (millions of colors, compressed to the nines). The algo just isn't there that can calculate the best colors to use. Not only that, jpeg is rasterized, where as GIF is essentially a bit map of sorts, mapped to 256 palette code points. Apples and oranges that don't mix or get along.
Best to start with a GIF (or PNG 8 ) collection in your assets, and create the animation frame by frame. Then you can be sure to have the result you want.