What part of a sentence is the phrase "am going", as in "I am going to pray"?
It’s the first person singular of the present tense indicative of the auxiliary verb ‘be’, followed by the ‘-ing’ form of the main verb ‘go’. Together they express progressive aspect, which typically describes an action taking place at the time of speaking. In this example, however, ‘go’ carries no sense of actual movement. The construction is one of the ways in which English, in the absence of a future tense, expresses the future. It indicates the intention to do the action described by the following verb, ‘pray’.
In terms of immediate constituent analysis, ‘I’ is a Noun Phrase and the whole of the rest of the sentence is a Verb Phrase.
The Berkeley parser says:
The meaning of these tags is here.
"am" is treated as the head-word here, just as it is in "I am green", "I am hungry" or "I am the president". "am going" is not treated as a phrasal unit in English. It could be a phrasal unit in some other language where the concept of "am going" is represented (with morphology) with just one word.
OP's use of am going to is a semi-auxiliary modal (as opposed to the 'fully auxiliary' modal will) used to express what would be the future tense in other languages.
English doesn't really have a future tense - we just use the present tense plus those 'helper' auxiliaries. Will and be going to are pretty much interchangeable for this purpose, but will stays unchanged, whereas be going to conjugates as normal (I am going to. You are going to...)
Note that this usage is not the same as, for example, I am going to London. Although this may have a 'future' sense, it can also be present tense (you could say it to a traffic cop who stopped you en route and asked what you were doing).
The 'primary' verb in my example is to go, but in OP's it's to pray. This is more obvious in the alternative/equivalent future tense I will pray.