As one of the most fundamental physical phenomena, the anomalous Hall effect (AHE) typically occurs in ferromagnetic materials but is not expected in the conventional superconductors. Here, we have observed a giant AHE in kagome superconductor CsV3Sb5 with transition temperature (Tc) of 2.7 K. The anomalous Hall conductivity reaches up to 2.1*10^4 {Omega}-1 cm-1 which is larger than those observed in most of the ferromagnetic metals. Strikingly, the emergence of AHE exactly follows the higher-temperature charge-density-wave (CDW) transition with TCDW ~ 94 K, indicating a strong correlation between the CDW state and AHE. Furthermore, AHE disappears when the CDW transition is completely suppressed at high pressure. The origin for AHE is attributed to enhanced skew scattering in CDW state and large Berry curvature arose from the kagome lattice. These discoveries make CsV3Sb5 as an ideal platform to study the interplay among nontrivial band topology, CDW and unconventional superconductivity.