Only God, Himself, can judge us after we die. It is devastating for your family to think that your grandfather had no chance of heaven, so stop thinking that way as soon as you can trust God enough to do so, for at least two reasons. The first reason, of course, is that only God can judge us when we die.
The second reason is that to assume the worst scenario for your grandfather is detrimental to your health. You must carefully guard over this precious body, mind, and soul that God gave to you—His gift to you, and yours to cherish. Don’t make yourself sick over a situation that is not yours to judge. Just place all of your trust in Jesus, and, yes, do pray for your grandfather’s soul.
We have only a fraction of the understanding of the depth and scope of what God can do and will do. It’s entirely possible that in what we perceive as a coma, or unconsciousness, however brief or lengthy, was a time during which your grandfather reached a new level of understanding, and did decide that he wanted to be with God. We’re not privy to those last communications between God and man, so we must proceed as we would for any other poor soul who has died and “pray them to heaven.”
We know that time is different for God, with no restrictions as to what he can accomplish. With God, nothing is impossible and all things are possible. It’s God’s world and His rules. Since He’s the umpire, we must trust Him to take care of all His children, even His wayward children, as He sees fit. For our part, we can pray for their souls each day, just as we hope that someday someone will pray for us after we die.
It might comfort you to study Catholic teaching about temporal atonement for sins, purgatory, and indulgences. Best wishes to you and your family.
Continue to pray for him according to your beliefs, but let God do all the judging