Gimp
Don’t do it often, but if I need to pull a particular loop from a video or something,
ffmpeg
works perfectly fine.You can use LosslessCut or Avidemux or something to trim the video to the few seconds you want to loop and then do the rest with ffmpeg. Technically, you can do it all with ffmpeg, but LosslessCut is just a nice GUI for that exact purpose (pretty sure it uses ffmpeg as a backend).
Actually, LosslessCut may be able to export to GIF, but I think I tried once and had issues with that. Could be misremembering.
Need to add in some flags and filters with ffmpeg, though, otherwise it just straight converts it to the absolute highest quality in the highest resolution and at the same source framerate, which leaves you with a massive file.
I’m not certain about editing actual GIF files. ImageMagick might help there, and I know you can throw a GIF into GIMP and make changes there, but it’s really cumbersome.
For creating new GIFs entirely out of unique static images? No idea, unfortunately. Never done that, I don’t think.
GIMP opens each frame of the GIF as a layer. It’s probably not a good choice for longer GIFs though.
I skip over gifs. I use OBS to record MP4s and cut them up with OpenShot. I use Spectacle as a snipping tool screenshot thing.
Imagemagick + ecosia/google
I use normally just use EZGIF (an old-fashioned web tool), but I happen to also have Adobe Fireworks CS4 (which is from 2008) on an old MacBook for more advanced editing.
There’s probably a good FOSS tool out there, but I don’t edit or even create GIFs often enough to bother looking.
To make brand new gifs: DaVinci Resolve, because it is super easy to add captions, and then convert to gif with ffmpeg. To modify existing gifs: GIMP
ScreenToGif