The first part means in accordance with what happens or what is said, and 가다 is the going. In these lines it is almost always about deferring: going wherever the other person decides, wherever your feet take you, wherever the flow goes, or exactly as the sign tells you. Careful with the other job of 대로, which after some verbs means as soon as; none of these lines use it that way.