Biliary tract cancer is a devastating malignancy of the bile ducts and gallbladder with a dismal prognosis. The study of the precancerous lesions has received considerable attention and led to a histopathological classification which, in some respects, remains an evolving field. Consequently, increasing efforts have been devoted to characterize the molecular pathogenesis of the precursor lesions, with the aim of better understanding the mechanisms of tumor progression, and with the ultimate goal of meeting the challenges of early diagnosis and treatment. This review delves into the molecular mechanisms that initiate and promote the development of precursor lesions of intra- and extrahepatic cholangiocarcinoma and of gallbladder carcinoma. It addresses the genomic, epigenomic and transcriptomic landscape of these precursors, and provides an overview of animal and organoid models used to study them. In conclusion, this review summarizes the known molecular features of precancerous lesions in biliary tract cancer and highlights our fragmentary knowledge of the molecular pathogenesis of tumor initiation.