Gates not opening

I build fences along my roads to prevent animal attacks. Due to road bends or diagonals this can be difficult. Built in sections with gates on the road, in one area the gates looked like they were open but the building icons said people wouldn’t be able to get through, a lot of villagers died. As I said, this was in one section, gates in other areas worked fine.