So, somebody left a palisade in village territory, complete with a gate - open. I couldn't find anyone who knew who had the key, so I decided to replace the gate. I was unable to attack the gate. Even when both cornerposts supporting it were removed, the gate posts remained. I finally resorted to extending the walls and building another gate outside the first one.
This seems like a bug to me.