Here's my current undestanding of the connectivity of the basal ganglia. Let me know if I've got something wrong or left out something important. Images from the wikipedia entry.
The basal ganglia include striatum, globus pallidus (GPe, GPi), subthalamic nucleus (STN) and substantia nigra (SNc, SNr).
The striatum can be subdivided into a ventral part: nucleus accumbens (NAcc), and a dorsal part: putamen and caudate nucleus (caudate only in primates). NAcc is not included in this diagram, probably because it recieves dopamine separately (from the ventral tegmental area) and is therefore not impaired in Parkinson's disease. NAcc recieves primarily prefrontal cortical input and does reward learning. Caudate-putamen recieves primarily motor cortical input and does sequential movement, from fine motor control to habits.
90% of neurons in the striatum are GABAergic medium spiny neurons. When dopamine input from substantia nigra to caudate-putamen is reduced in Parkinson's disease, inhibition of global pallidus and subthalamic nucleus is disrupted. Lesion or deep brain stimulation to either of these regions is common when L-dopa treatment fails.