As @ralphm says photoshop works quite well for that. GIMP also has an animation feature and is free but i find gimp is normally a tiny bit more complicated that photoshop.
as a slight aside animated Gif's can be annoying on pages where there is a lot of text to read as they sit there doing their thing whilst distracting the reader. A simple way to sort it would be a small bit of JS to switch the image 'on' and 'off' which would simply switch the animated gif for a static one, you'd just have a 'play' button for the user.
Just a thought.