I had the same problem. What i did was i walked all the way around, crossed the water, and then walk up the slope
where the bridge entered into town. Then i walked back on the bridge, towards the closed gate. Then i entered the
door near the closed gate.
Now i was with kim and the peasants. I could resume the quest, walk back through the door
and wait for kim, thief and peasants to walk through the closed gate. (they didnt follow me through the door,
but slid through the closed gate

)
Hope this helps.