There are several GIF creating apps that you can download from the internet or app store. They way that I have done it is to use iMovie and the Keynote app that already is on the Mac. (It if isn't, you can download it free from the app store. ) You need both apps because iMovie will play a GIF as an ordinary non-looping video but will not export it out as a looping GIF.
Here's the procedure that I do. Put the photos into iMovie. Set the duration at 1 second per photo. Export to the desktop as a video file. Drag the video file into a Keynote presentation template. (Open Keynote, select a template, delete the text in it, and then drag in your video.) Do File/Export to Animated GIF onto the desktop. (In the Keynote export box, set the auto-advance slider to zero.) Play the GIF on your desktop by selecting (not opening) its icon and pressing Command-Y on the keyboard.
You can do the same thing by creating a slideshow in the Photos app, exporting it as a video file to the desktop, dragging the video file into Keynote, and exporting from Keynote as an Animate GIF file to the desktop.
-- Rich