So if laughter and humour are traits in common to humans and gorillas, they must have been a response developed long ago, by primate ancestors held in common by humans and gorillas. To work out what it is about, it is probably necessary to imagine what kind of social-bonding role it served for our primate ancestors.
I would imagine that it served as a signal of, "I trust you" (enough to close my eyes and roll about helplessly), "I am relaxed in your company and I want you to be relaxed in my company", "We are on the same wavelength".
It is also an important signal of affluence and well being: "I am so well fed, healthy and rested that I have time up my sleeve to be silly and have fun". "I am free of worries". "I am so confident that I can afford to relax instead of staying on guard". This would have been a definite attractant to potential mates: Wow, someone who is so successful a food-gatherer that they have time for a laugh!
Like they say, grinners are winners! The fact that laughing and humour made our ancestors more attractive to each other, means we still have that trait today.