Gohan fights Cell (or Perfect Cell) in the Cell Games Saga of Dragonball Z episode 166 with the title “Faith in a Boy”. This occurs in episode 181 of the original Japanese Anime.
After Goku declares that he has given up, which comes as a shock to Cell. He tells Cell that there is someone that is stronger than himself that will fight. The Z fighters thought that Goku had gone crazy as they knew no one else who was stronger than Goku. Eager to know who Goku was talking about Cell asked him to reveal the person, and that person turned out to be Gohan.
Gohan was shocked to know that he was the one his father was talking about. This was based on the fact that Gohan saw himself weaker than his father. It was revealed however that Gohan was in fact stronger by some questions raised by Goku. After an encouraging lecture to Gohan by his father, he decides to fight Cell.