刚 (gāng) and 刚才 (gāngcái) are similar, but they have somewhat different uses.

Both Come Before the Verb, But Have Different Emphasis

刚 emphasizes something "just" happened
"刚" is actually an adverb, and it is placed in front of the verb. It emphasizes that the action just happened a short time ago. It is similar to the English "just."
The key here is that "a short time ago is relative, and determined by the speaker. For this reason, 刚 can indicate that something "just" happened 1 second ago, 5 minutes ago, 2 hours ago, 3 weeks ago, or even a year ago. The absolute time is flexible, but from the speaker's perspective, it feels recent.

Structure

Examples

Tā ɡānɡ lái .
他 刚 来。
(This gives the impression that not only did he just get here, but he should still be here.)
He just came.

刚才 emphasizes "just now"
刚才 is a time noun (like 今天 and 现在), and it expresses that the time that has passed is really short, in near-absolute terms. We're talking no more than 1-30 minutes, in most situations. If it is placed before the verb, it emphasizes what happened in the time that has just passed. It is similar to the English "just now."

Structure

Examples

Wǒ ɡānɡ cái kàn ɡuò le , bú xiǎnɡ zài kàn yī biàn .
我 刚才 看 过 了,不 想 再 看 一 遍。
I saw it just now, and I don't want to see it again.

刚才 can be used as an attribute while 刚 cannot

刚才 can also directly modify a noun to indicate it is that one from "just now" or "just before."
Structure

Examples

Gānɡ cái de shì qínɡ tài rànɡ rén shēnɡ qì le.
刚才 的 事情 太 让 人 生气 了。
What just happened really made people angry.

刚 Can Be Used with Adjectives

刚 is an adverb, and it can also spruce up an adjective. It has the same meaning as 刚刚. (刚才 cannot do this.)
Structure

Examples

Tiān ɡānɡ qínɡ.
天 刚 晴。
The sky just became clear.

刚 and 刚才 with 了

You may have noticed that something interesting is going on with regards to 了 in the sentences with 刚 and 刚才. Namely, 了 is not usually required in sentences with 刚, but it is usually required in sentences with 刚才. This is because 刚才 refers to a time in the recent past, and you're usually indicated that something happened just now (started and finished).
Take these sentences for example:

Wǒ zuó tiān mǎi le.
我 昨天 买 了 。
I bought it yesterday.

So these are all simple time "noun + verb" sentences. Notice that when they refer to the past (including the one with 刚才), the action is completed and you need 了. You don't need 了 for things that haven't happened yet (they're just plans, and nothing is completed). And remember that 刚才 always refers to the past.

OK, now what about 刚? Why does it not need 了?
The key is that you don't need a 了 in a sentence with 刚 if the verb indicates a clear result. So, to use the 买 example from above:

Wǒ ɡānɡ mǎi dào .
我 刚 买 到 。
(Adding 到 to the verb gives a clear indication of result.)
I just bought it.

刚 and 刚才 with 没

OK, so there's also something going on with 没 in sentences with 刚 and 刚才. The deal here is that you can say something didn't happen just now (刚才), but you can't say that something just didn't happen (刚). [Saying that something "just didn't happen" only works in English if you interpret "just" to mean "simply."]
The takeaway? Just don't use 刚 in sentences where you use 没 to negate the past.

Wǒ ɡānɡ cái méi qù 。
我 刚才 没 去 。
(It's fine to use 刚才 with 没 in the past.)
I didn't go just now.

For that last pair of sentences, if you're not clear why it's OK to use 不 with 知道 in the past, go ahead and check out our article on the differences between 不 and 没. It goes beyond the basics into some of the trickier scenarios.