1) Когда заранее планируется что-то:
It is too late that is why I'm going to do my homework next time.
There is some issue connected with car engine. I suppose, he is going to help me with my car.
2) Когда говорим о том, что происходит с большой вероятностью и для этого есть признаки:
As you can see, today weather is quite cloudy. It's going to be rainy outside.
Look at this messy homework, he is, probably, going to have a bad mark.