This phase II trial is studying how well giving 3-AP together with gemcitabine works in treating patients with unresectable or metastatic bile duct or gallbladder cancer. Drugs used in chemotherapy, such as 3-AP and gemcitabine, work in different ways to stop tumor cells from dividing so they stop growing or die. 3-AP may help gemcitabine kill more cancer cells by making them more sensitive to the drug.