I think this phrase is predominantly restricted to Australia, but with some use found in New Zealand. I've never heard it in British or American English, and wouldn't have understood it without suitable context.
The earliest example I found in Usenet is from 1994 in rec.motorcycles.dirt by someone in Melbourne, Australia:
The conrod, piston, bearings etc etc I ordered finally arrived in the
hotel a couple of days after I checked out. The hotel let it sit there for
another few days before they let me know. I cracked the shits over the
phone and the hotel fell for it. They've paid for express delivery to Aus.
He he he he he....
I was nearly in *DEEP* shit when I got home. Dumb me left that photo in my
suit case. Wife wanted to know whose tits they were.
I found nothing earlier in Google Books or newspaper searches.
My guess is the phrase is a combination of crack meaning to "open up" and the shit meaning "trouble". For example, from AllDownUnder.com's list of Australian slang phrases:
Crack a tinnie
Meaning: open a can of cold beer
Example: Come over to my place and we'll crack a tinnie.
And if someone is "in the shit", they're in (serious) trouble, as shown in the Usenet quote above and defined in this dictionary of Australian slang:
In the shit - in serious trouble.
And in A Concise Dictionary of Slang and Unconventional English (Eric Partridge/Paul Beale):
12. In in the shit, in trouble: low coll.: since mid-C.19. Often land (another) in the shit, or fall in the shit (oneself): since ca. 1879. Cf. the envious (e.g. he) could fall in the shit and come out smelling of violets (roses, etc.) 13. Hence, among soldiers in WW1, in the shit = in the mud and filth in mud and danger; in great and constant danger. [P.B.: E.P. was one of those soldiers, and no doubt wrote this entry with feeling.]
So crack the shits could be derived from losing one's temper and putting other people in deep trouble.