Assumimg black and white, the three sliders in the "Levels" dialog are BLACK POINT, WHITE POINT and GAMMA.
Black point sets that level of gray in the image that registers as the darkest black. Everything below that is clipped or registered as darkest black, as well.
I assume that would be the same as timing your exposure to achieve max density. Right?
White point sets that level of gray in the image that registers as the whitest white. Again, everything above that point is also clipped to white.
I assume that this would be the same thing as adjusting your combination of developing to get the highlights and/or adjusting contrast. Am I right so far?
Now the tricky thing for me to understand is the gamma.
In Photoshop, gamma adjusts the midpoint between black and white. It sets the "average."
For color things get weird. You basically have to repeat all the steps you took to achieve best image in black and white and do them four times. One each for R/G/B or C/M/Y channels and one more time for overall brightness.
As others have said, I am guessing that to adjust the gamma in a photograph in the darkroom would require a combination of all three, exposure, development and contrast to find the average brightness overall.