2324. 'And Lot was sitting in the gateway of Sodom' means those people with whom the good of charity exists but whose worship is external - people represented by 'Lot' here - who are among and yet separate from the evil, which is meant by his 'sitting in the gateway of Sodom'. This becomes clear from the representation of 'Lot', and from the meaning of 'a gateway' and also of 'Sodom':
From the representation of Lot: When Lot and Abraham were together he represented the Lord's sensory perception, and so His External, as shown in Volume One, in 1428, 1434, 1547. But now that he has separated from Abraham he ceases to represent the Lord any longer and instead represents those who are with the Lord, namely the external member of the Church - those with whom the good of charity exists but whose worship is external.
[2] Indeed in the present chapter Lot represents the external member of the Church, or what amounts to the same, the nature of the external Church, not only as it is at the outset, but also as it is in its development, and as it is at the latter end too. The latter end of that Church is what is meant by Moab and the son of Ammon, as will be clear, in the Lord's Divine mercy, from the sequence of events described in what follows. In the Word it is common for one person to represent many consecutive states, which are described as consecutive actions in his life.
From the meaning of 'a gateway': A gateway is the place through which people enter or leave a city, and therefore 'sitting in the gateway' here means being indeed among and yet separate from the evil, as is normally the case with members of the Church with whom good that stems from charity exists. Though they are together with the evil they are nevertheless separate from them, not as regards civil society but as regards spiritual life.
'Sodom' means evil in general, or what amounts to the same, the evil, especially those inside the Church, as has been stated above, in 2322.