"Heck" is an alteration of the term "Hell". It's just another way of saying "Hell" that is a little less offensive. Many people wouldn't find Hell offensive but, at the same time, some Christians would. It's a way of being safe and polite.
It's much the same as people say "Oh my gosh!" instead of "Oh my God!" because "gosh" is less likely to offend.
Therefore:
"I'm having one heck of a time." = "I'm having one Hell of a time". = "I'm having a REALLY GOOD time".
Take care and good luck! :)