Father Gallagher is a fellow priest.
While the priests were on their flight home from a pilgrimage, it landed in trouble due to Dougal pressing the red emergency button in the cockpit, which caused the plane to run out of fuel.
After his suggestion that they all pray to God for a safe outcome got a muted response, Ted decided to hold a competition to see who would get the two parachutes available onbard and when it came to Father Cave's turn he said that he hadn't written anything down as what he planned to say came from the heart. Turning to Father Gallagher next to him he told the latter that he was in love with him and that he should get the last parachute as the latter looked on speechless.
Following the plane being saved, the two priests looked on quietly as the other priests and nuns cheered.