Never mind, I figured it out! If anyone is interested, it's from the first season of the 1995 revival of The Outer Limits and is called "The New Breed" and it's a great episode!
From Wikipedia's plot description:
Andy later discovers that he has pelvic cancer, and has approximately one year to live if the hip and leg are not removed. In desperation he sneaks into Stephen's lab and injects himself with the nanobots. They quickly eliminate his cancer.
[...]
Stephen embarks on a series of tests to find out exactly what the nanobots are capable of. Andy is submerged in water and unable to breathe, but the nanobots keep him alive. Things begin to go wrong when Andy wakes up the following day to find that the nanobots have responded to the tests by giving him gills, allowing him to breathe underwater in the future. After telling Stephen of this, they both agree that the nanobots must be deactivated immediately. Stephen is unsuccessful — he takes measure after measure to stop them, but he is never able to eradicate all of them.