The researchers, who have called the gene "hangover", believe that a similar version may exist in humans and could help explain why alcoholism tends to run in families.
A study published in the journal Nature has found the gene helps fruit flies to develop a tolerance to alcohol, a condition in humans that soon leads to dependency and addiction.
Flies lacking the hangover gene do not develop the tolerance seen in those with the gene, said Ulrike Heberlein of the University of California in San Francisco.
"Repeated alcohol consumption leads to the development of tolerance, simply defined as an acquired resistance to the physiological and behavioural effects of the drug," Dr Heberlein said.
"This tolerance allows increased alcohol consumption that, over time, leads to physical dependence and possibly addiction," she said.
Fruit flies in nature are often exposed to alcohol in rotting fruit and there is strong evidence to suggest that the drug has a similar effect on the insects, the scientists said.
"When flies are exposed to ethanol vapour, they become hyperactive, unco- ordinated and eventually sedated," Dr Heberlein said.
The research team also discovered that - in addition to making the flies more tolerant of alcohol - the hangover gene appears to influence the way the insects respond to stressful conditions in their environment, such as increased temperature.
The gene may, therefore, play a more general role in dealing with stressful conditions and its influence on alcohol tolerance is a side-effect, the scientists said.
A similar pathway might function in humans, suggesting that addiction may initially be triggered by the way in which the body responds to stressful factors such as high alcohol intake, the scientists said.Reuse content