For Pat(rick) Gavin (+variants) B 1847 +/- 2 yrs, Co. Galway, with a father forenamed S(tephen), I found 1 rcd, 1845, Kilcummin-Oughterard RC parish. Except for the DOB, this matches your criteria precisely. Note - it was not unusual for people born in this era to not know their DOB, or even B year. Also, the info provided to the person preparing the death cert. may have been in error. Therefore, this rcd has a high probability of being for your ancestor.
For Bridget Flanagan B 1854 +/- 2 yrs, Co. Galway, with a father forenamed Bryan, I found 0 rcds. In the rest of Ireland (in the current database), the closest to your criteria is an 1857 rcd in Co. Westmeath.
For Stephen Gavin M 1840 +/- 6 yrs, Co. Galway, I found 1 rcd, 1840, Kilcummin-Oughterard RC parish. The rarity of the forename and the fact that the M occurred in this specific parish infers this is highly likely to be for this ancestor. A view of the M rcd SHOULD show the bride's name and SOMETIMES their parents' names.
For Bryan Flannagan M before 1854, somewhere in Ireland, I found 3 potential rcds: 1831 Meath, 1835 Westmeath, and 1840 Westmeath. There is a tenuous correlation with the rcd for Bridget. You will have to explore this further using the IFHF database to see if the B and M occurred in the same Co. Westmeath parish.