The gypsy man struck Elie's father in order to demonstrate his supposed superiority over his prisoners.
I would like to point out that the gypsy is also a prisoner at Auschwitz. The Nazis would often use prisoners to guard other prisoners in the concentration camps during World War II. It seems like an odd system to have prisoners watching prisoners, but the system worked because men like the gypsy would enforce Nazi concentration camp order in hopes of receiving better treatment from the Nazis. The gypsy's immediate and extreme use of violence against Elie's father allows the gypsy to set a tone. Elie's father now knows not to mess with the gypsy, but everybody else that witnessed the event knows the exact same thing. Elie's father asked a simple question.
"Excuse me…Could you tell me where the toilets are located?"
The gypsy responded by striking Elie's father so hard that he crawled back into line. The gypsy made an example of Elie's father, and now the rest of the new prisoners know that he (and the other guards like him) are meant to be taken very seriously.
When Elie and his father were taken to the camps they ended up in Auschwitz which was one of the worst barracks to inhabit. It was a system of snitching and cruelty that involved the Nazis using prisoners to watch over one another, sometimes exerting unnecessary cruelty over the others in aims to get treated better by the Germans.
Elie's father, Schlomo, simply asked where were the toilets, as he needed to go to the bathroom. The "Gypsy" was by then the prisoner in charge of the supervision of those barracks. As his name entails, the "gypsy" was a man of suspicious background and so he may have been more cruel to the others than the Germans would have been, especially if they were to receive special treatment from the Nazis.
...he slapped my father with such force that he fell down and then crawled back to his place on all fours.
This incident marks yet another sign of the pathetic nature of the situations that the Jews had to undergo at the hands of their torturers.