Both were legalized under the Liberals.  Pierre Trudeau decriminalized Gay Sexual relations and was a Catholic.

Paul Martin was the PM when Same Sex Marriage became legal and he is also Catholic.

If I am remembering correctly there was a bishop in Alberta that threatened to Ex-communicate both Martin and Chretien (the Ontario Lawsuit that started the legalization was 2003) for not supporting the traditional definition of marriage.

Personally I don't feel that religion has a place in our laws - when you are an MP/MPP you should have to set aside your beliefs and vote for what it right for all not just what your holy book says.