Gohan defeats Cell in episode 166 of Dragon Ball Z, during the climactic conclusion of the Cell Games arc where Gohan taps into his Super Saiyan 2 power to finish him off.