In the story as written, Gohan wins — and that is the answer most people forget. Goku's fight with Cell ends with him conceding the match and handing the fight to his son, whose Super Saiyan 2 form is what actually finishes the android.
The claim that Goku beat Cell and Frieza simultaneously is not supported by the manga or the anime. What is true is that Goku defeats Frieza comfortably on Namek, and that Cell is explicitly framed as beyond him at that point in the story.
Power-scaling arguments love this matchup, but the text is unusually clear: Goku recognises he cannot win, sacrifices himself to stop Cell's self-destruct, and Gohan lands the deciding blow. Any other result requires ignoring the Cell Games entirely.