Well, here's one approach.
Think of the roles that nouns play in a sentence.
As a subject: Chocolate is great. Dogs are great.
As an object: I like dogs. I like chocolate.
Sometimes what you like, or what you want to say is great isn't a normal noun, one that you can touch, like chocolate or dogs. It's not even an abstract noun like "happiness." It's a verb-thing. It relates to the activity of doing what verb. That's when you need a gerund.
A geurnd is a "verb-thing" that can serve in a sentence where you need a noun.
Swimming is fun. Having you over for dinner would be our pleasure. I don't like riding the bus.