Gerunds are verbs with an –ing ending that live the exciting life of a noun, which is why they are sometimes referred to as verbal nouns.
Gerunds can act as the subject, direct object, subject complement, or object of a preposition.
If it acts like a noun, you’ll have to treat it like a noun. That means that if there’s ever a noun or pronoun appearing alongside a gerund, it must be in a form that will allow it to modify another noun. It must be in the possessive case.
Let’s make a comparison using another noun: yard.
What pronoun case would you use? The objective or base form of a noun?
No! That would sound absurd! You would use the possessive case!
The gerund acts as a noun, so you’ll have to treat it as a noun and use the possessive case whenever a noun or pronoun precedes it.