DUBLIN — Voters determined to have their voice heard on gay marriage turned out in strength Friday for Ireland’s most hard-fought referendum in decades, a contest that pitted the liberal forces of social change against the nation’s conservative Catholic foundation. Polls closed at 10 p.m. after 15 hours of voting that featured long-distance trips by Irish citizens, including thousands of emigrants who returned by aircraft or ferry to take part in the world’s first national vote on gay marriage. Backers of gay marriage had hoped for high turnout, reflecting strong participation by young and first-time voters.