It is easy to use GIMP to create animation in GIF format (just use Google and you can find many examples). However, to extract individual layers of an animated GIF is another story, and I can't find a straightforward approach in GIMP.
Fortunately, the solution has been exist. There is a script by saulgoode*. After downloading the script, save it into your .gimp/script directory, then run GIMP. You will find the added function in ``File --> Save all layers...''. Note there is no option for you to choose the saving directory, and all the saved layers (the default format is PNG) will be in the working path of GIMP.
*Here is a tutorial video to show the usage of the script, but I don't know whether the video uploader is the one who write the script.