In theory, gene therapy could be used to treat cancer. In practice, it is not for a variety of reasons.
1) Gene therapy is currently very crude and primitive. Scientists have yet to develop means of efficiently and site specifically incorporating new genes into specific cells. Current technologies insert new genes into a fraction of the target cells and these new DNA sequences are inserted randomly into the genome. This random insertion can disrupt important genes and (ironically) cause cancer. Gene therapy is currently useful for some genetic diseases, but it is currently only practical in cases where the disease being treated is worse than cancer, the possible side effect of gene therapy (one example of such a disease is bubble boy syndrome. Unfortunately, because of the deaths of one of the participants in a gene therapy trial, I believe clinical trials involving gene therapy were suspended due to safety concerns [I'm not sure if this is still the case]).
2) Cancer is not caused by one single mutation. Cancer is the effect of many different mutations combining to cause the disease. Fixing multiple genes is much more difficult than fixing just one gene.
3) Cancer is not one disease. That is, every cancer is caused by a different set of mutations in each individual. One patient may have one type of mutation in p53 that inactivates it. It is possible that adding active p53 back into this individual via gene therapy could cure his cancer. However, if another patient has a dominant negative mutation of p53 or a mutation in a protein that regulates p53, it is likely that the same approach would fail to cure the cancer. Thus, a prerequisite for gene therapy is personalized medicine: a cheap, fast approach for profiling an individual's cancer genome to identify the specific mutations causing the cancer. Personalized medicine would allow doctors to devise the correct strategy for the gene therapy treatments, without which gene therapy would be ineffective. Unfortunately, DNA sequencing technologies remain too expensive for personalized medicine applications.
4) Not all cancer mutations are fully understood. Even if we could cheaply and quickly sequence a cancer genome and identify the mutations, we would, in some cases, not know what the most effective treatment would be.
Therefore much more fundamental and applied research must be done in these fields before gene therapy can become a viable option for cancer treatment.