Here's why:
* "To" is a preposition, but in this case, it's part of the infinitive form of the verb "go".
* "Go" is a verb.
Together, they form the infinitive form of the verb "go" which acts as a noun, adjective, or adverb depending on its use in a sentence.