The root word here is the Latin terrere, which means terror. Originally, if your aunt's cooking was terrific, you called it that because it inspired fear and dread on a life-threatening level. In the early 1800s, people began to use it facetiously, "That opera was a terrific bore!" That morphed into a meaning closer to huge or grand, and by the late 1800s it was being used as it is today, to mean good and happy. (Awful took the opposite journey, initially meaning "awe-inspiring" and worthy of fearful respect. Eventually, following the same methods and timeline, it came to mean so bad it's worthy of awe. Just … awful.)
This word was transformed by creeping, where one of its outermost definitions crawls forward, picking up meaning until it has turned into a whole new term. It starts with the obvious. To swell: To grow larger. To be big, inflated. Then that became a noun to describe someone who was big and inflated, an important person. (Watch enough old Twilight Zone episodes and you will eventually hear some big shot referred to as a "Swell.") Then it made the easy leap to "That's really swell!" A big deal, exciting, and important.
3. Hunky dory
One theory is that hunky dory came from the Japanese Honcho dori, which could translate roughly into "easy street." The theory says it was popularized by 19th-century white sailors who would hang out on Easy Streets looking for fun. The problem with that is the timeline: Hunky Dory was being used in America by the early 1860s, but Japan had been closed to foreign fleets (and prostitute-seeking white sailors) up until 1854. So while it is possible that the term made it from Japan all the way to popular American vernacular in six years, it's hardly a certainty. The other theory is hunky came from hunkey, which meant "everything's fine," which itself came from the old American slang hunk, which meant "safe, at home" (hunker down). Nobody's sure where dory comes into that theory.
In the mid-19th century, a spiff was a pay bonus that stores would give their salesmen for moving undesirable products. If you sold an ugly suit, you got spiffed. There was also spiflicate, which was an even older word meaning "to confound, completely overcome." So you'd spiflicate some poor shlub into buying an ugly tie and then get a spiff, which you could then put toward getting all spiffed up yourself to take your girl out. Spiffy.
Jolly could come from a couple of sources. The most obvious would be the French jolie, which, depending on the century, meant, "festive, merry, amorous, pretty." Jolly is also a uniquely Christmas-y word (Old St. Nick is not hunky dory. He is jolly.), so many historians believe it could also come from variations of jol in Germanic languages. The Germanic jol means "yule," which in turn means "Christmas."
Tickety-Boo, though not used much anymore, is the happiest of British slang. An upper-class, early-20th-century British-ism for "everything is just fine," tickety-boo most likely came from the Hindustani ṭhīk hai ("all right, sir"), which is what your Indian servant might say to you when you told him to bring 'round the Bentley during the Raj. Rear Admiral Lord Louis Mountbatten, the last viceroy of India, popularized the term in the 1940s, and it became regular slang among the Royal Navy.
The origin of gnarly is painfully obvious once someone has already revealed it to you. Gnarly comes from surfer slang of the 1960s, to describe a wave that was difficult, dangerous, and awesome. The water in the wave would literally appear gnarled, curled, and messy. If you could ride it, well, gnarly, dude.