I was always under the impression that Fredo knew what was coming when Connie collected Anthony from him, the hail mary was said in a way as if he knew he was going to die.
I thought it was like a score, similar to the baptism/murder scene "Do you renounce satan..." score.