"Invictus" means "undefeated" or "unconquered." The poem's narrator says that he is not daunted by the circumstances in which he finds himself. Here is a paraphrase.
Out of the night that covers me,
Black as the Pit from pole to pole,
I thank whatever gods may be
For my unconquerable soul.
The speaker says that even though it's a very dark night, black as hell everywhere, he still is grateful to the gods for the strength of his soul. The night could be literal, but the fact that he's comparing to hell (the pit) and saying it covers the entire earth (from pole to pole) suggests that he is talking metaphorically about some dark situation.
In the fell clutch of circumstance
I have not winced nor cried aloud.
Under the bludgeonings of chance
My head is bloody, but unbowed.
Despite the fact that he is in a dire plight, he has remained undaunted. Fell clutch of circumstance means dire grasp of bad fortune. The word chance also emphasizes that his circumstances are not deserved, but due to bad luck. Even though he has been wounded, he still hangs on to his dignity, not bowing his head to fate: My head is bloody but unbowed.
Beyond this place of wrath and tears
Looms but the Horror of the shade,
And yet the menace of the years
Finds, and shall find, me unafraid.
Looking past his immediate circumstances, he can see only death in his future. Nevertheless, despite the threat he is facing at this time, he is not afraid.
It matters not how strait the gate,
How charged with punishments the scroll,
I am the master of my fate:
I am the captain of my soul.
Strait means "narrow." There's also an echo of straits which metaphorically means "difficulties." The scroll that is charged with punishments is the record of his destiny, which is full of tribulations. No matter how difficult it will be to escape these circumstances, he is still stronger than they are, because he still is the master of [his] fate and the captain of [his] soul. That is, he has the ability to stand strong even when fate seems against him. He can still choose to be brave in the face of adversity and not concede defeat. In this way, he controls his fate rather than letting his fate control him.