The first migration act, to my knowledge, is the Page Act in 1875 [1]. It prohibited the import of people for labor without their free and voluntary consent, and gave the government the power to restrict "undesirable" migrants. In this case, "undesirable" was effectively determined to mean Chinese women, whom were disproportionately involved in prostitution and concubinage for reasons the Wiki gets into. Shortly thereafter we'd get our first broad immigration law which excluded felons, people with various contagious diseases, convicts, those who did not directly pay for their own passage (to avoid the above issues), polygamists, and so on.
We effectively enacted labor laws to help enforce human rights, and that was not just a pretext. It remains, to this day, difficult to enforce laws against human trafficking and protect the victims of such. Now imagine this back in the 19th century! In modern times we've also changed a lot that's made migration a much more complex issue. Two very big issues:
-----
1) In times past there were negligible to no social programs. If you didn't earn enough money to feed yourself, you'd starve. Today we of course do not let that happen, but that changes one big thing. It creates a social responsibility for each person that comes to the country, which in turn drives a motivation to ensure a certain 'quality' of migrant, which may be unfair. For instance it's trivial to migrate to the US if you have money. On the other hand somebody who genuinely wants to move here and work and be a productive member of society, but has no resources, is going to face difficulties migrating.
2) Transportation used to be extremely expensive. Now it's cheap. Imagine if a place like Finland started a meaningful basic income program available to any resident (and not just citizens), tomorrow. By next week they'd see their population swell with millions of migrants to the point that their nation would be forced into complete insolvency destroying their program (and country) in the process. In times past traveling between continents had absolutely enormous barriers to entry. This meant far fewer people did it which, in turn, kept supply low and demand high. Now there are near 0 barriers to entry (beyond local migration controls) for migration.
-----
Migration, for a mix of reasons - many of them fully well intentioned, has just become much more complex. And anyhow looking back at history, I don't think it's any specific group. The Irish, rolling with your example, were not just openly accepted. There was substantial discrimination and other issues between Protestants (majority of Americans at the time) and Catholics (majority of Irish/German migrants). For instance JFK being a Catholic was a very big deal, and that was in 1960! And there was also of course the stereotype of a drunken, violent, criminally inclined Irishman. 'NINA' = No Irish Need Apply signs were commonplace. There were also things such as the "Know Nothing" movement [2] which was geared largely against Irish and German migrants. But as they rose above the stereotypes entirely of their own volition, and culturally integrated in general, all of this resistance faded over the decades.
OK, so in a US context (and that of several other colonial countries) this raises the question of how that used to be the case, why and when it was stopped, and at what date in history it became the right answer that the current set of Americans were the "right" ones and future arrivals weren't. For example, the Boston Irish are a distinct and not entirely integrated community who in the past have been sponsors of terrorism in the form of overt IRA fundraising. Should they have been allowed in?
(This is not my actual opinion of Bostonians, this is just me twisting historical fact to present the most hypothetical negative case)
Australia used to pay people to immigrate ("ten pound poms"). When and why did they stop?