I get the impression you're talking about the bandit camp quest, just because any other time the gaurds roam freely and it's really not hard to evade them. If you run out and kill the first set of bandit gaurds, run almost to the door, there will be a big rock on the side of the path you can hide behind (not the ones that make a loop in the path, this one is right on the left side of it, facing the doors.). If you hide behind that a wait, they'll send more gaurds out. Wait until the last one goes up the path to that loop, and use your sneak option to sneak across the path, then feel free to run into those doors. Might take a few times to get right, but it works easily once you get it.