One Day at Dachau

I cannot think of anything more representative of the absolute worst that humans are capable of than the words on this gate. Arbeit Macht Frei--Work Makes You Free. How long did these gates stand before the words on them took on the meaning they now have? I can't imagine stepping off of a train, not quite knowing what was in store but fearing the worst, and seeing this phrase.