The primary philosophical justification for this in governmental or political terms is social contract theory. Essentially, social contract theory is the viewpoint that both a person's moral and political obligations derive from an agreement that they have made (implicitly or explicitly) with their society (or government). Social contract theorists argue that this type of agreement is vital to forming a society, and in fact, much of modern Western moral and political theory is derived out of the work of the famous triumvirate of social contract theorists: Thomas Hobbes, John Locke, and Jean-Jacques Rousseau.
There are various justifications for this theory, depending on which of the three social contractarians you choose to read. But most of them agree that humans abandoned the natural state (where all beings were completely free to do as they liked) in order to enter into an ordered society that revokes some of their natural liberties in order to provide them with collective benefits such as security and protection. The fundamental idea is essentially that the rights required to be given up have less net desirability than those rights that can only be ensured and protected by a government or society.
Now, you might argue, that this is all well and good for the parents of that child, but what of the child itself? It clearly isn't old enough at the time that it is born to have agreed to comply with any type of contract, social or otherwise. You seem to be driving at exactly this argument when you say:
Although his or her parents could have freely decided to become members of a certain nation, to what extent is the country legitimized in extending its authority over the newborn?
Well, the answer is a fairly simple one, and certainly one that the social contract theorists anticipated. There have been only very few instances in which human beings have actually gotten together and signed a written contract—in keeping with the relatively Western nature of this philosophy, the Magna Carta is often cited as the canonical example. In the rest of cases, indeed the majority of cases, the consent to this social contract is assumed to be implicit, or tacit.
The argument usually goes something like this: By virtue of choosing to remain in the territory which is under a particular social contract, the individual has tacitly given consent to be governed by that society and therefore give up his/her individual rights as required to gain the larger benefits of that society. In fact, the argument goes, this tacit consent (the ability of people to "vote with their feet") is what gives the government its legitimacy.
To answer your question more specifically, I'll focus on the writings of John Locke, arguably the most influential and widely-known of the social contract theorists.
Locke says that simply walking along the roads of a particular jurisdiction is tantamount to tacit, or implied, consent to the laws of that government. A person agrees to obey the laws of a society while it is living within the territory of that society. He says that this explains why resident aliens are obligated to obey the laws of whatever state in which they reside, even though they are not naturalized citizens of that society. This obligation no longer holds when they return to their country of origin, but it necessarily attaches while they take up residence in that particular jurisdiction.
And the idea of property ownership (a recurring theme throughout Locke's philosophical views) becomes important here as well. If a person inherits property, then that works to create an even stronger bond between the individual and the commonwealth. The idea is that the original owner of that property agreed to place this property permanently under the jurisdiction of the commonwealth or society, and that by inheriting this property, the inheritor also inherits the obligation to follow the laws of that society.
So when children accept the property of their parents, they also tacitly consent to the jurisdiction of the commonwealth and agree to abide by the rules of the social contract.
For more on this line of thought, I highly recommend picking up a copy of John Locke's seminal work, The Second Treatise of Government. It's a relatively short little book (as these things go), and well worth a read for anyone curious about the nature of governmental sovereignty and implied consent.