The recent versions of Gimp include a favicon plugin. I'm running 2.2.1.3.
Open your image with GIMP.
If your image is not a square then resize the canvas with GIMP.
Scale the image to 16x16 pixel (Image, Scale image).
Choose File, save as.. and save as favicon.ico
When you hit save, the plugin will be invoked and it will ask you to specify the alpha and palette and some other stuff. Probably best to play around with various settings on that to see what works best.