Keep it to one line if you can
GIFs are watched quickly and often small. A caption of three to eight words reads in one glance; longer text wraps and gets smaller, which is harder to read on a phone. If you need two thoughts, put one at the top and one at the bottom by captioning twice.
Pick contrast over color
White text with a black outline is the classic meme look because it stays readable over light and dark frames. Use the dark bar when the background is busy, and the yellow style when the GIF is mostly white.
Watch the file size
Captioning re-encodes every frame with up to 256 colors. If the result is too large for where you're posting, choose 320 px, or run it through the free [GIF compressor](/tools/gif-compressor) afterwards.
Use a browser that can read GIF frames
Reading individual GIF frames needs ImageDecoder, which current Chrome and Edge support. In other browsers the page tells you before you start, and ChatCut on the web or Desktop can add text to a clip instead.