Whether it is mechanical (trauma), chemical (anaesthesia) or electrical - which part of the brain is shut down to cause loss of consciousness?
There is no widely-accepted neurological structure that mediates 'consciousness.' Even if some structures have been shown to be necessary for consciousness, they have not been shown to be sufficient. This is true with anesthetic mechanisms as well -- their ability to paralyze and block pain signals is fairly well-understood, but the mechanism of loss-of-consciousness is still unknown.
Still, 'consciousness' has to be there, somewhere between being awake and being dead, states which anesthetics can readily bridge (review):
Nevertheless, at some level of anesthesia between behavioral unresponsiveness and the induction of a flat EEG [indicating the cessation of the brain’s electrical activity, one of the criteria for brain death (22)], consciousness must vanish.
Later in the same review:
The evidence from anesthesia and sleep states (Fig. 2–3) converges to suggest that loss of consciousness is associated with a breakdown of cortical connectivity and thus of integration, or with a collapse of the repertoire of cortical activity patterns and thus of information (Fig. 2). Why should this be the case? A recent theory suggests a principled reason: information and integration may be the very essence of consciousness (52).
This is consistent with my own take. Consciousness itself is the subjective experience of 'brain,' so it can't be lost, just poorly integrated.
Consciousness is a difficult term to grasp in a short answer, and the question is as interesting as it is challenging. The reticular formation as mentioned by others before me is crucial, as the thalamus is the gateway of information to and from the brain. Therefore, subcortical structures such as the thalamus, when 'shut down', induce unconsciousness. Mircea Steriade (2005) has an excellent review on this and he is a leader in the field the field of sleep and absence epilepsy, thalamo-cortical interactions and consciousness. He describes there the cortical responses seen in the EEG during sleep: the sleep spindles, or related spike-and-wave discharges (SWDs) seen in the EEG during absence epileptic seizures, where patients temporarily loose consciousness. Sleep spindles and SWDs are highly synchronized responses that basically block out sensory input and cortical output. The blocking of sensory input and blocking of output to the body may be regarded as a loss of consciousness, as one is not able to sense the environment or undertake action in response to environmental stimuli (e.g., Kostopoulus (2000)).
However, since the question is what part of the brain needs to shut down, it is technically the neocortex, as the neocortex holds the key to being aware of one's surroundings, i.e., processing of sensory input as well as driving motor neurons to move, talk and respond to stimuli (see wiki page on neocortex). So the end organ mainly associated with consciousness is the neocortex - as described in a review paper by Nobel laureate sir Francis Crick (1990). The authors also indicate the thalamus and other structures as possible sites involved, but principally it is the neocortex. I hope this helps you a bit further.
Two structures are required for consciousness: the brain stem reticular activating system (RAS) and one cerebral hemisphere, as stated here. e.g. a lesion in the RAS or bicerebral injury will induce loss of consciousness.