First find the gif you want to use. Squarish gifs work best (ones with a width and height that are the same).
We then need to resize the gif so its smaller than 150x150 pixels. Otherwise when you upload it, it will be downscaled to that and all animation will be lost. To resize we will use a website: ezgif.com
On ezgif, first click on the gif crop tab, Upload your gif (or paste the online link to it). Then tick the Aspect ratio - Square box. Now move around and resize the square so it includes everything you want in your avatar. Then click crop it
Now if you scroll down you will see the new cropped image that was made. In the toolbar next to that click resize. For the new width and height enter: 150. Then press resize it
Finally, scroll down to the new image and press optimize. Now we will try to make the file size as small as possible (this helps load times on the forums, <500kb should be great). Lossy gif level 80 (medium mode) should be fine but you can experiment so see what optimizes best without losing too much quality. Finally press optimize it.
Now you are done, press the green save button, download your gif and upload it as your avatar on the forums using by clicking here.