"What is the literary term that describes the moment at which you realize that you have been wrong. Sort of having an epiphany of the fact that what you once believed is completely crap."
This describes the first half of the equation for Cognitive Dissonance.
The second half is made up by how you act upon this _________ (whatever the literary term is you are searching for). You got two basic choices: 1) maintain the various mental gymnastics required for that part of your mind that wants to deny and pretend that what happened didn't happen.......IE> doublethink; 2) confront, admit and ackowledge the situation, thereby leading you to either amend or discard your now-blown previous belief IE> what is other wise known as learning.