How to add a border to a selection in GIMP
If you wanted to add a border only to a selection and not the complete image, then you should read this other post BorderToImage
Choose the part of the image to which you want to add the border. For a comprehensive guide on selection in GIMP, read http://docs.gimp.org/en/gimp-tools-selection.html
I’ve chosen the large text in the middle for bordering.
Now click on Select->Border
Specify the width of the border and choose the units.
Choosing feather border will cause the selection intensity to decrease slowly, thus giving a smooth border.
If lock selection to image edges is not selected, then the selection might change upon contact with the image borders.
Now click OK. You’ll notice that the border of the selection has been automatically selected. You may now fill it with any colour/gradient as you’d like.
This is the final outcome that I got after filling the selection. Note that it is possible to fill the selection at once by pressing shift while using the fill tool.