sounds fine to me (except, perhaps, for the repetition of the subject in the main clause)
Main clause: The city plans to put up a gate around the entire city
'To'-infinitive clause: to make it more closed in and private.
The people of the city want to keep someone or something in or out of the city. By putting up a gate around the entire city, they will make the city more private.
The city will then be 'closed in' because the space of the city will be separated from the space outside the city. 'Closed in' meaning an enclosed area.