I'm pretty sure Godot has no built-in functionality to export a gif. You'll either have to read up on the gif-format and write your own exporter, or rely on a community plugin.
I don't know what plugin you tried, but it looks like this one should be able to do what you're asking for https://github.com/jegor377/godot-gdgifexporter. If you run into issues with a plugin I suggest you report an issue in the plugins repository, or kindly ask the author for help.