Intra- and interindividual variation in drug responses is one major reason for the failure of drug therapy, drug toxicity, and even the death of patients. Precision medicine, or personalized medicine, is a field of medicine that customizes an individual's medical diagnosis and treatment based on his/her genes, microbiomes, environments, etc. Over the past decade, a large number of studies have demonstrated that gut microbiota can modify the efficacy and toxicity of drugs, and the extent of the modification varies greatly from person to person because of the variability of the gut microbiota. Personalized manipulation of gut microbiota is an important approach to rectify the abnormal drug response. In this review, we aim to improve drug efficacy and reduce drug toxicity by combining precision medicine and gut microbiota. After describing the interactions between gut microbiota and xenobiotics, we discuss (1) the effects of gut microbiota on drug efficacy and toxicity and the corresponding mechanisms, (2) the variability of gut microbiota, which leads to variation in drug responses, (3) the biomarkers used for the patient stratification and treatment decisions before the use of drugs, and (4) the methods used for the personalized manipulation of gut microbiota to improve drug outcomes. Overall, we hope to improve the drug response by incorporating the knowledge of gut microbiota into clinical practice.