GIFs aren't normally used in emails because some email clients do not support them. You can use them, however, if you make sure that they "fail gracefully" (meaning that if something goes wrong, it does so in such a way that the end user hardly notices anything is amiss). In this case, that's done by using the first frame of the GIF as a standalone image to represent the entire animation, in case the recipient's email client doesn't support the animated GIF format.
For more information about animated GIFs in email, check out this article from CampaignMonitor.
Also, here's some info on making your own animated GIFs.