An excellent question, and Caliber1 has it: in your example "pasar" is in the infinitive, it functions as a noun, and it is the complement of the construction "ir a [infinitive], which is an extremely common alternative to using the future tense.
Many verbs either allow or require some type of complement in order to complete the idea of the verb. Often one of the allowed or required types of complements is an infinitive. The types of complements that can follow a particular verb and how each type of complement connects to the verb (either directly or after a particular preposition such as 'a', 'de', 'en', 'por', 'para', 'con', 'contra' and so on) are specific to each verb, which means that you have to learn them one by one.
|