"Crap" is a euphemistic word for excrement. We've used it so much, nowadays we've kind of forgotten how it came into use.
"Holy shit" on a cracker": saying it's on a cracker is just a way to lengthen the expression, and get all the power out of it, "milk it for what it's worth." Of course, if it's on a cracker, I guess it's also going to be eaten. Yuck.
"Crap" is derived from the surname of the inventor of the flushing tiolet, Thomas Crapper. Thus the toilet came to be known as the "crapper." (I doubt he liked what his last name became synonymous for...). Within time what went into the toilet became known as "crap."
As the others have said, "Holy crap!" is an expression of surprise or frustration. It's definitely not something one would use in polite company. The "on a cracker" part was probably added for the alliterative value and to add emphasis.
Think of the phrase "Oh, for goodness sake!" said with a great deal of frustration, then imagine it with a rather vulgar connotation, and there you have it.