The hostility in Ireland goes back to the time of the Normans. The specific hostility in Ulster goes back to the Flight of the Earls in the late 17th century. The native Irish were driven beyond the Pale (that is where the phrase comes from) and land and farms within the Pale, most of Ulster, was granted to protestant immigrants from Britain, the majority of whom came from Scotland.
Although the Irish problem is always seen as a religious problem, it is actually a conflict between the dispossessed and the usurpers, in essence a colonial war. It is just that the the dispossessed clung to their religion as a sign of defiance and the colonial power imposed their power by trying to impose their religion.
Although the 1948 religious divide of India and Pakistan looks superficially similar, I think the roots of the conflict are different.