It is a verb. You can tell someone that you are "planning to go to the beach." In this case, and all other cases, it is a verb because you are doing something.
Though, you can you "plan" as a noun. "I have a plan to go to the beach." Here, plan is the noun because it is a thing, and "to go" is the verb.