The Food and Drug Administration on Wednesday approved the first-ever treatment that genetically alters a patient’s own cells to fight cancer, a milestone that is expected to transform treatment in the coming years.

The new therapy turns a patient’s cells into a “living drug,” and trains them to recognize and attack the disease. It is part of the rapidly growing field of immunotherapy that bolsters the immune system through drugs and other therapies and has, in some cases, led to long remissions and possibly even cures.

The therapy, marketed as Kymriah and made by Novartis, was approved for children and young adults for an aggressive type of leukemia — B-cell acute lymphoblastic leukemia — that has resisted standard treatment or relapsed. The F.D.A. called the disease “devastating and deadly” and said the new treatment fills an “unmet need.”

Novartis and other companies have been racing to develop gene therapies for other types of cancers, and experts expect more approvals in the near future. Dr. Scott Gottlieb, the F.D.A. commissioner, said that more than 550 types of experimental gene therapy were being studied.