It is implied that the soldiers were not able to see Peter and the angel as they walked by. Alternate translation: "The first and second guards did not see them as they passed by, and then" (See: [[rc://en/ta/man/jit/figs-explicit]])
Here "by itself" means neither Peter nor the angel opened it. Alternate translation: "the gate swung open for them" or "the gate opened itself for them" (See: [[rc://en/ta/man/jit/figs-rpronouns]])