Et barn isn't necessarily a baby. The dictionary definition of barn is someone who is in the first stage of their life, from birth until they hit puberty (though I sometimes hear it used until the person is 13). It can also be used by parents to refer to their son or daughter whatever age they are.
"A baby" in Danish is "en baby" (or "et spædbarn", but this is formal and, in my experience of having Danish as a second language, never really used in daily speech) which is defined as a small child up to the age of around 1 year.
Therefore a baby can be "et barn" but "et barn" isn't necessarily a baby.