A long, long article summarizing lots of research on language-learning ability, and whether the commonly shared belief that children are much better at learning languages than adults actually holds true: Critical Periods For Language: Much More Than You Wanted To Know.

In summary:

Children seem to be able to pick up second languages faster than adults. It’s hard to tell exactly when the learning rate slows, or to be sure this is a biological phenomenon instead of an effect of school ending or picking low-hanging fruits. Mastering a language perfectly in adulthood is hard, but maybe just because there’s not enough time to learn it at adult’s slower learning rates.

Babies don’t seem any better than older children (eg 17 year olds), and are limited by being babies. The difference between their excellent ability to learn a first language, and (for example) a middle-schooler struggling to learn a second language, probably is just exposure and motivation, and not an additional magic language ability.