Handbrake is great. But I would also recommend using Kdenlive. It is a video editor but if you just open your video in it and just export the project, you will get some good output format options.
GIFs exported in the original file resolution are usually pretty damn big, but I don't like giant GIFs myself, so I've found the 480x270 to be a good size to keep most of them below 25 megabytes.