A majority of Scots back same-sex marriage, according to the most detailed survey of public opinion since MSPs began moves to change the law.

A YouGov poll shows 56% of Scots support the legislation going through Holyrood. However a significant minority - 35% - are opposed, while 8% are unsure.

The findings were welcomed by campaigners for same-sex marriage who said MSPs should "take heart" from the level of support among the public.

However, the anti-gay marriage campaign, Scotland for Marriage, said the poll showed parliament was out of step with public opinion, while the Catholic Church accused MSPs of a "total failure" to represent people's views.

They compared the findings with an initial Holyrood vote last month when 76% of MSPs backed the proposals, against 12% who opposed and 12% who either abstained or stayed away from parliament on the day.

The poll of 1118 Scots adults, conducted a week after the Holyrood vote, found 30% "strongly supported" and a further 26% "tended to support" the proposals. Nineteen per cent "strongly opposed" and 16% "tended to oppose" the law change.

Clear generational differences emerged, with voters more likely to support same-sex marriage the younger they were. More than three-quarters (77%) of those aged 18 to 24 supported same-sex marriage, with 13% opposed. Among over-60s, 38% were in favour and 53% opposed, making them the only age group with a majority against gay marriage.

Women were significantly more likely to support same-sex marriage than men. Nearly two-thirds of women (64%) support the legislation with 29% opposed.

By contrast, fewer than half of men (48%) support same-sex marriage, much closer to the 43% opposed.

By Holyrood voting regions, the Lothians were the most socially liberal area, with 69% of voters in favour, followed by Glasgow with 62% support. Support was lowest in central Scotland (48%) and the west of Scotland (50%).

Support for the proposal was similar among Labour, LibDem and SNP voters, with roughly two-thirds in favour and one-third against. The position was reversed among Conservative voters, however, who opposed the measure by two to one.

At Holyrood all the main parties support the move, though individual MSPs have been allowed to vote according to their conscience.

Tom French, policy co-ordinator with the pro-same-sex marriage campaign group Equality Network, said: "As we approach 2014 it is clear that the large majority of Scots believe it's time LGBT people had full equality, including an equal right to marry the person they love."

However, a Scotland for Marriage spokesman said: "This poll shows a significant number of people do not agree with redefining marriage, and the MSPs at Holyrood are utterly out of step with the voters. The Scottish Parliament must do much more to reflect the will of the people, and it could start by introducing proper civil liberty safeguards for those who believe in traditional marriage."

A spokesman for the ­Catholic Church in Scotland said: "The YouGov poll makes worrying reading. It clearly shows Scotland's MSPs are completely out of step with public opinion."

Scotland for Marriage, an umbrella group which includes the Catholic Church, the Kirk and Muslim communities, has vowed to continue its fight.

A final vote is due next year but opinion at Holyrood is not thought likely to change significantly following detailed scrutiny of the Marriage and Civil Partnership Bill. The first gay ceremonies are expected in early 2015.

Under the Scottish Government's proposals, religious and faith organisations would "opt in" to perform same-sex marriages if they accepted the idea.

Celebrants who are part of an organisation which has not opted in would not be allowed to conduct same-sex marriages. Others would be protected from having to conduct ceremonies if it went against their personal beliefs.

Want to take part in polls like this one? Join the YouGov panel today.