Your 1840's Irish ancestor would be tough to define as an "anchor baby" since the Fourteenth Amendment which absolutely granted citizenship to anyone born US soil was only passed AFTER the Civil War. The reason that provision was included was so newly freed slaves could not be deported or denied their citizenship. Remember, the IMPORTATION of slaves was illegal in the United States after 1808. Slaves were bred and their offspring were born slaves and raised on the plantation like livestock. The Thirteenth Amendment may have freed the slaves, but it did not make them citizens of the United States.
Your ancestors from the early 1800's very likely came from Ireland as indentured servants. There was no smuggling involved. An indentured servant was a worker, typically a laborer or tradesman, under contract to an employer for a fixed period of time, typically three to seven years, in exchange for their transportation, food, clothing, lodging and other necessities.
Often employers had complete communities for these workers. Large mills were established in New England in the early to mid 19th century. The region became a manufacturing powerhouse along rivers because the rivers drove the mills and supported the mill towns.
So someone needing workers for a foundry for example would recruit workers who wanted passage to the United States in exchange for their labor. There was nothing illegal about it, it was common.
As for naturalized citizens, aside from legally entering the country, it does require a statement of intent to become a citizen and an oath of allegiance to the United States. It also requires passing a test on US history, the Constitution and the American system of government.
There are high school graduates, born and raised here, that would be put "back on the boat" if they had to pass the test.
http://usgovinfo.about.com/blinstst.htm