Summary:

It is also an act of war to enter a civ's territory if you don't have an "open borders" agreement with that civ. A pop-up will appear and ask you to confirm your move. Note that it isn't an act of war to cross a city-state's borders, so no pop-up will appear in that case.