Luke 2:7 says, "Mary gave birth to her firstborn son and wrapped him in swaddling cloths and laid him in a manger because there was no room for them in the inn." This one verse is why we think of Mary and Joseph arriving in Bethlehem at the last minute, being turned away by an innkeeper, and then giving birth to the Savior of the world in a barn! But none of that is accurate.
Due to the census decree, Mary and Joseph journeyed to Bethlehem, and verse 6 says, "while they were there, the time came for her to give birth." So they'd been there for a while. It wasn't like she arrived in labor pains. Joseph didn't drag his wife from Nazareth nine months pregnant. Because they went back to the place of their lineage, they would have been staying with family.
We get the idea that because the inn was full and Mary laid Jesus in a manger, He must have been born in a stable, but scripture doesn't say that. The Greek word for "inn" is kataluma, which also means "guest room." The word comes up again in Luke 22:11 to describe the upper room where Jesus and his disciples had their last supper.
The typical first century Palestinian* home had two levels: the upper room was for dining and sleeping, the lower level for work and fellowship. At night, the animals would be brought inside to ensure they wouldn't run away or be stolen, and that's where the manger would have been. Mary probably preferred to have her baby downstairs because the guest room was full of people who were there to register for the census. But Jesus was born in a home, not a barn.
Now, if that ruins your perspective of Christ's lowly beginnings, it shouldn't. Instead of being born in the palace, which would have been visible from Bethlehem, the King of kings was born in a peasant's home, in the part where the animals sleep. Though he was God, He made himself nothing so that through Him we might have everything, when we understand the text!
"Have this mind among yourselves, which is yours in Christ Jesus, who, though He was in the form of God, did not count equality with God a thing to be grasped, but emptied Himself, by taking the form of a servant, being born in the likeness of men." Philippians 2:5-7*The word "Palestinian" is most commonly used to describe a region of the Middle East that includes Israel, and has been in use for 2,500 years. Palestine was not referred to as a state until more recent years.