What is has a higher priority in naming organic compounds, alkyl groups or halides?
The current IUPAC recommendations (2013) read as follows:

Numbering
When several structural features appear in cyclic and acylic compounds, low locants are assigned to them in the following decreasing order of seniority.
(…)
(f) detachable alphabetized prefixes, all considered together in a series of increasing numerical order;
(g) lowest locants for the substituent cited first as a prefix in the name;
(…)

Note that Rule f takes precedence over Rule g.
Furthermore,

The lowest set of locants is defined as the set that, when compared term by term with other locant sets, each cited in order of increasing value, has the lowest term at the first point of difference (…)

Therefore, the example is named as 3-chloro-2,2-dimethylbutane rather than 2-chloro-3,3-dimethylbutane since the locant set ‘2,2,3’ is lower than ‘2,3,3’.