You would think that aligning text within the GIMP would be a simple task. Go to the "Text Tool" add your text and use the controls there to align "Left justified", "Right justified", "Centered" or "Filled". While that works fine but it may not be what you are looking for (you may not even notice any change if you only have a small amount of text.
Using this method will align the text within the boundaries of the new text layer that you added to the image. It won't align the text relative to the image.
To align the text relative to the image (like with many other tasks within the GIMP) there are different ways that you can do things. Using the "Alignment Tool" is probably the easiest method of aligning text relative to your image or layer.
When using this tool you will need to ensure that you have selected the text that you wish to centre, otherwise the controls will be grayed out (as seen in the picture below) and unusable.
From within the "Alignment Tool" you have several alignment choices . You can align relative to:
These should cater for most situations.