When a noun or pronoun precedes a gerund (a verb form ending in -ing that is used as a noun), the noun or pronoun is possessive. (See also 8.7, Punctuation, Apostrophe.)
The toxicity of the drug was not a factor in the patient’s dying so suddenly.
The award recognized the researcher’s planning as well as his performance.
Present participles (used adjectivally) should not be confused with gerunds. In the sentence below, the objective case (them) is correct.
I watched them gathering in the auditorium.
If the possessive their were used instead of the objective them, the emphasis would be on the action (gathering).