At least 11 people have died on both sides of the Polish-Belarusian border since thousands of migrants began trying to cross over during the summer.
The crisis escalated earlier this month when larger groups of migrants began arriving at the border, camping out in dire conditions along a razor wire fence.
Tuesday’s ceremony took place at the Bohoniki cemetery for Poland’s ethnic Tatar minority, where three other migrants are buried.
The tiny white coffin was carried by two members of the local Muslim community and the imam, as the first snow of the season blanketed the surrounding fields.
A simple plaque on the grave carried the name: “Halikari Dhaker”.
“These people did not leave their homes, their countries for a tourist trip, but to find a better life,” the imam, Ali Aleksander Bazarewicz, told mourners.
“When we dug the first grave, we were hoping it would be the last. Unfortunately, that was not the case,” he said.
The baby’s parents did not attend the funeral.
The mother is in serious condition in hospital and the father along with their five children are in a migrant centre in the nearby city of Bialystok.
Polish volunteers came to the rescue of the family in a forest on the border near the village of Narewka on October 12.
“The children were sitting calmly and quietly next to their mother, who could not stop screaming. Their father was wringing his hands and asking for help,” Piotr Matecki, one of the volunteers, told the Gazeta Wyborcza daily.
“She had been suffering like this for two days, lying down, vomiting water, not eating anything,” he said.
An ambulance took the woman to hospital where doctors confirmed that the foetus had died.
The new grave lies alongside those of a 37-year-old Yemeni, Mustafa Mohammed Murshid al-Raymi, a 19-year-old Syrian, Ahmad Al Hasan, and an unidentified migrant.