If you're using anything before 2.8, you'll want to save it, and on 2.8, you need to export it (with the .gif extension of course). On the .gif menu that comes up, make sure you check the "as animation" box.

Mine's grayed out because the example image I used only has one layer, but as long as you have multiple layers in your image, you're good.