Slum areas in Ethiopia have high poverty status. In addition, they possess poor water and sanitation accesses such as unsafe drinking water, a lower number of sanitation facilities and poor hygienic conditions. These scenarios are important in the occurrence of diarrhea among under five children’s. However, there are many studies conducted on diarrhea among under five children in Ethiopia, unfortunately, the majority usually didn’t give enough coverage for the burden of diarrhea among under five children in slum areas. This study aimed to determine the prevalence of diarrhea and associated factors among under five children in slum areas of Gondar City. This community-based cross-sectional study was conducted in slum areas of Gondar City among under five children from March 28 to April 28, 2023. A multi-stage sampling technique was used to collect a sample of 836 through interview-administered methods using a structured data collection tool. The collected data was manually checked for completeness, coded, and entered into EPI Info version 7.1.5.2 software. It was then exported to Stata version 14.1 software for descriptive analysis, as well as bivariable and multivariable binary logistic regression analyses, to identify factors associated with diarrhea among under five children. The prevalence of diarrhea among under five children at 95% confidence interval was 24.64% (CI 21.71–27.56). Mothers/caretakers age < 25 years (AOR = 1.88, 95% CI 1.16–3.06), mothers/caretakers age between 28 and 31 years (AOR = 1.82, 95% CI 1.08–3.05), mothers/caretakers who had no formal education (AOR = 3.18, 95% CI 1.86–5.41), mothers/caretakers who had primary education (AOR = 1.67, 95% CI 1.09–2.57), income level between 4877 and 5643 Ethiopian Birr (AOR = 1.81, 95% CI 1.04–3.15), family size greater than five (AOR = 1.54, 95% CI 1.00–2.36), flies around the house (AOR = 2.27, 95% CI 1.38–3.73), playground not clean (AOR = 2.70, 95% CI 1.62–4.50), breastfed for ≥ 1 year (AOR = 0.63, 95% CI 0.41–0.97), mothers/caretakers who did not wash their hands before food preparation and eating (AOR = 2.31, 95% CI 1.39–3.58), mothers/caretakers who did not wash their hands after visiting latrine (AOR = 1.60, 95% CI 1.07–2.38) were significantly associated factors with diarrhea among under five children in slum areas of Gondar City. The study indicates that the prevalence of diarrhea was higher among under five children in slum areas of Gondar City. The Gondar City Administration Education Bureau should give great emphasis on improving mother’s and caretaker’s education. In addition, the Gondar City Administration Health Bureau should educate mothers and caretakers about breastfeeding, sanitation, and hygiene in the slum areas of Gondar City.