I thought C=C is the "functional group" here and Br is a substituent so the numbering should start from the top left C, making the name 4-Bromo-3-methylbut-2-ene, but my book says 1-Bromo-2-methylbut-2-ene. Which is correct?
According to P-14.4 in Nomenclature of Organic Chemistry: IUPAC Recommendations and Preferred Names 2013 (Blue Book):
When several structural features appear in cyclic and acyclic compounds, low locants are assigned to them in the following decreasing order of seniority:
(e) saturation/unsaturation: [...]
(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;
In this compound, unsaturation, in the form of the double bond, has the priority for low locants. Since both numbering schemes (shown below) assign the locant '2' to the double bond, criterion (e) is not sufficient for the purposes of deciding between the two options.
However, criterion (f) does allow for a choice to be made. The detachable prefixes in this name are 'bromo' and 'methyl'. Since the locant set (1,2) is lower than the locant set (3,4) (note that both sets are ordered in increasing numerical order as stipulated), the preferred IUPAC name (PIN) will use the locant set (1,2).
Note, however, that your double bond also contains configurational information. According to the Cahn–Ingold–Prelog rules (see P-92 of the Blue Book), the double bond in your molecule as drawn is (E)-configured. Stereodescriptors such as 'E' are cited together with the locant describing the position of the stereogenic unit (see P-91.3).
Hence, the PIN of the molecule as depicted in your question is (2E)-1-bromo-2-methylbut-2-ene.
Note that contrary to existing answers, there is no inherent preference between "bromo" and "methyl" for low locants, unless the application of criterion (f) does not lead to a difference. In that case, criterion (g) must be invoked. Since 'bromo' is earlier than 'methyl' in alphanumerical order, it will be the prefix cited first in the name, and will therefore have priority for a lower locant. For example:
You are correct that double bond gets preference over halogen. But after that, we seek to give small locant to bromo and methyl. Since in second name, both substituents get smaller locants, it is the correct name.
That is correct name is 1-Bromo-2-methylbut-2-ene
Had the question been this instead:
Then the name would have been 1-Bromo-3-methylbut-2-ene because in this case as orthocresol comments:
The name 1-bromo-3-methylbut-2-ene is preferred over 4-bromo-2-methylbut-2-ene because the locant set (1,3) is lower than the locant set (2,4). Alphabetical order only comes into play when the locant sets are the same.