The only time I believe Cell was stronger then Gokou was after he killed Gokou, and King Kai and came back with the whole lightining aura. It has nothing to do with Gohan having hidden potential as to why he beat Cell. It's the fact that his emotions control his power mostly and that he's stronger then Gokou when he's mad.
That's my opinion anyway. Sure Gohan has the hidden potential but its not why he beat Cell..or at least had anyways. Didn't Elder Kaioshin unlock all of it though in Buu Saga making him Chou Gohan?
Gokou would have been toast against Cell after he killed Gokou and came back to Earth though. Not that my opinion matters much. Gokou gave up and let Gohan fight and that's all that really matters.