In the sentence "Keeping track of all her grandkids' sporting activities was driving Ms. Smith to tears," the function of "keeping" is that it acts as a noun. Therefore, the correct answer is:
Keeping functions as a noun.
In this context, "keeping track" is the subject of the sentence.