Historically speaking... What's the real reason for Junktown to close the gates at night? Werewolves and vampires terrorizing the streets or something?
It generally just makes sense. Less guards that can be posted, as people have to sleep sometime. More outside threats, like Raiders and Deathclaws attack at night. And they have a baus gate, so someone has to use it

But canonically I believe it had something to do with the guy who ran Gizmo's, he was assassinated at night or sumat.
The only way to have the gates open at night (according to wiki/never tested myself) is to have 500 Rep and no faction affiliations.