Why captions ruin GIF file sizes, and what to do
GIF compresses each row of pixels by finding repeated runs. Flat areas compress beautifully; sharp, high-contrast edges do not, and text is nothing but sharp high-contrast edges. A caption can add noticeably to a file that was otherwise small.
Two things help. Keep the text still — a caption that moves changes pixels in every frame, while a stationary one lets the encoder skip unchanged regions. And prefer a hard outline over a soft shadow: the shadow introduces a gradient of near-identical colours that eats palette slots and compresses badly.