The gene, called CYP3A7, is normally only active in infancy, but in some people it continues to be switched on into adulthood, and over-activates their metabolism.
Adults with active copies of the gene produce enzymes that break down hormones and about half of all clinically used drugs - potentially reducing the effectiveness of some cancer treatments.
Scientists at The Institute of Cancer Research, London, found that 7-8 per cent of around 2,500 cancer patients analysed had a cluster of single-letter variations in their DNA code causing CYP3A7 to be active in adults.
If the results are confirmed in other studies, they could help to suggest ways of better optimising cancer treatments for patients with this version of the CYP3A7 gene.
The study, published today (Thursday) in the journal Cancer Research, was funded by organisations including Breast Cancer Now, Bloodwise and Cancer Research UK.
The researchers set out to determine whether the cluster of genetic variants - which had previously been associated both with levels of the female sex hormone oestrogen and with risk of developing breast cancer - was also associated with an increased risk of poor cancer outcomes.
They carried out a series of analyses on samples from 1,008 women with breast cancer treated at The Royal Marsden NHS Foundation Trust, 347 patients with lung cancer and 1,128 with chronic lymphoid leukaemia.
The scientists found that 7-8 per cent of patients in each group - breast cancer, lung cancer and leukaemia - carried a specific single-letter genetic 'tag' in their cells which suggested they had the version of the CYP3A7 gene that was still active in adulthood.
They found that in all three groups of cancer patients, the tag was associated with a poor prognosis, possibly because of an effect on the way these patients break down therapeutic cancer drugs.
Among the breast cancer patients, the tag was associated with a 74 per cent increased risk of dying from breast cancer. Among the lung cancer patients, it was associated with a 43 per cent increased risk of death from any cause, and among the patients with leukaemia, it was associated with a 62 per cent increased risk of disease progression.
The study suggests that in the future, modifying standard types or doses of chemotherapy might improve outcomes in carriers of the activating genetic variant for CYP3A7, which is called CYP3A7*1C.
Study co-leader Dr Olivia Fletcher, Group Leader in the Breast Cancer Now Research Centre at The Institute of Cancer Research, London, said:
"Our study shows that some patients with breast cancer, lung cancer and leukaemia carry a genetic variant which increases their capacity for breaking down hormones - and potentially drugs. We showed that patients with the variant tend to have worse outcomes than those without, and one possibility is that they are eliminating chemotherapy drugs from the body too efficiently.
"We will need further studies to determine whether the genetic variant is exercising its effect by interfering with treatment, and if so, exactly how it is affecting treatment. Our research won't have an immediate impact on clinical practice, but in the longer term, doctors might be able to take into account the presence of this - and other - genetic variants in planning treatment, in order to make sure that all patients have the treatment that is best for them."
Professor Paul Workman, Chief Executive of The Institute of Cancer Research, London, said:
"Initially, research into cancer genetics was largely concerned with establishing the effects on the risk of developing cancer, but there is now increasingly also a focus on finding out how a patient's genetic background can affect response to treatment.
"This intriguing study suggests that genetic effects on a person's metabolism, and how they process drugs, could have an impact on their outcome after being diagnosed with cancer. In the future, it is likely that genetic testing will form a much more fundamental part of treatment planning for cancer, so that genetic variants like this can be taken into account in choosing the most effective therapy."
Dr Richard Berks, Senior Research Communications Officer at Breast Cancer Now, said:
"It's crucial that people with breast and other cancers receive the most appropriate treatment, tailored to their specific needs.
"This work could help identify cases where certain drugs will not be effective for individual patients, saving that person needless treatment with one drug and opening the door for an alternative that may be more beneficial to them.
"Research into how to use existing drugs more wisely will be critical as we move towards a world of truly personalised medicine, and one in which people no longer lose their lives to breast cancer."