The possessive modifies a gerund. A gerund is a verb that has been turned into a noun by the suffix “ing.” Visiting a college can be awesome. “Visiting” is a gerund—a former verb wearing the costume of a noun. Like any self-respecting noun, it must be modified by a possessive pronoun. You wouldn’t say, “Me book is good,” and you wouldn’t say “Me visiting a college was a good idea.” Say instead, “My visiting a college was a good idea.”