This is one of the most confusing aspects of the language .
In this case "to" function as a preposition.
Prepositions are always followed by the -ing form of the verb .
So, do not confuse this with the infinitive form of a verb , in which "to" function as part of the verb rather than as a preposition.
some phrases are:
Look forward to + _____ing
What do you say to + _____ing
be opposed to + ____ing
contribute to + ____ing
fall to + ____ing
with a view to + _____ing
Alex Carr