Yes, you are correct that "hold fast against" in this context means to resist or withstand something.
In the sentence you provided, "To use allegory to hold fast against the crushing blows of reality", the phrase "hold fast against" means to use allegory as a means of resisting or enduring the harshness of reality. Allegory is being used as a tool to help one cope with difficult circumstances.
Here's another example sentence to help illustrate the meaning:
The building held fast against the powerful winds of the hurricane. (meaning: the building resisted the strong winds and remained standing)
In general, "hold fast against" is used to describe a strong resistance against something.