Of course, it is possible that Jesus was born in a barn, but I don't think he was. At least, not the barn that you see in your imagination when you hear he was laid in a manger.
The primary reason I don't think he was born in a barn is an obscure verse in the Old Testament, Micah 4:8. Now, everybody knows Micah 5:2, the passage prophesying that the Messiah would be born in Bethlehem. But Micah 4:8 is less well known. It says,
And you, O tower of the flock,
hill of the daughter of Zion,
to you shall it come,
the former dominion shall come,
kingship for the daughter of Jerusalem.
(Micah 4:8 ESV)
The phrase, 'tower of the flock' is migdol eder in Hebrew (I'm not a Hebrew expert, so I'm transliterating...you might find it under different transliterated spellings, such as migdal or edar, etc.).
It means, as the English text indicates, a watchtower for a flock of sheep. It refers to an actual tower in an actual location just outside of Bethlehem. It isn't so much the location as it is the purpose of the place that makes me think this was very possibly the birthplace of Christ.
The place was first mentioned in the bible in Genesis 35:21. At this point in Genesis, Rachel dies giving birth to Benjamin. She was buried very near the site of the tower.
Remember that at this time in history, the temple in Jerusalem, less than 5 miles away, was still standing, and sacrificial worship was in full practice. The priests at the temple kept large flocks of sheep (and likely other sacrificial animals) for sale to those who needed them for temple worship. These flocks were of course not kept at the temple (that would have been scandalous because of the odor and mess), but just outside Bethlehem. It is these flocks to which I believe Luke refers in the nativity story (see Luke 2:8). The flocks weren't simply allowed to roam around with no one keeping an eye on them. The tower served as a place from which a few shepherds could keep an eye out for predatory animals, both four-legged and two-legged kinds. It was supposedly about 20 to 25 feet tall, with an upper story and a lower story at ground level. I've been told the foundation is still visible on a hillside just outside of Bethlehem today.
You may have heard it said that the nativity story is not believable because shepherds wouldn't have been out in the fields during the cold winter months that this time encompasses. Private shepherds likely weren't. However, the temple flocks were kept year-round, as sacrificial worship didn't take time off for cold seasons. So these flocks were tended by shepherds on a year-round basis.
Since these animals were destined for sacrifice, they were specially cared for. As you know from passages like Exodus 12:5, Leviticus 4:32, and Numbers 6:14 (there are many others), the sacrificial lamb was to be without blemish (a picture of the sinlessness of the Messiah; see 1 Peter 1:19). One of the critical times for these animals was the first day or so of their lives. They were prone to being damaged out in the fields as they stumbled about just after they were born, and any bumps and bruises at this tender age would likely show up as scars (blemishes) when they were old enough for temple worship. In order to protect them, the shepherds brought the pregnant ewes into the ground floor of Migdol Eder where there was a special birthing room. It was not like an ordinary stable, but was kept ceremonially clean by the temple priesthood. When the ewes gave birth to the new lambs, the babies were wrapped in swaddling cloths, and laid in a manger (feed trough) for a few hours to protect them from any scarring accidents.
If you read Luke 2 carefully, you see there isn't any information there as to the location of the Messiah. So how did the shepherds in the fields know where to go and find him? Note the sign given to them by the angel in Luke 2:12: "And this will be a sign for you: you will find a baby wrapped in swaddling cloths and lying in a manger." What was so unusual about a baby wrapped in swaddling cloths? Nothing. How could it be a sign of anything then? The key was, "...and lying in a manger." These shepherds, employees (as it were) of the temple, would have known instantly and exactly what and where the angel meant for them to go to find the newborn king.
So why is this important? It matters in this sense: everything in the Old Testament points toward the Messiah, the Christ. The entire Jewish sacrificial system was a type or shadow of the one sufficient sacrifice to come- the son of God. The laying of the sacrificial lambs in mangers, wrapped in swaddling cloths, is just one more proof of the reality and authenticity of Jesus as the Messiah, the final lamb and sacrifice which would take away the sins of the world (John 1:29).
There is much more to say on this topic, but I'm trying to keep this at a readable length. If you google 'migdol eder' (and variant spellings) you can find all sorts of variations on the idea, some more credible than others; many which include much more scriptural support than I have.
Migdol Eder as the birthplace of Christ is an idea worth considering.