Listen, guys.
Toei Animation, the company who created it, made a mistake.
Nobody taught Gohan to do a Kamehameha before the room of spirit and time.
In the JAPANESE version, he holds up his hands, charges up a yellow beam, and says "Kameha..MEHA!" and fires it.
The attack is obviously meant to be a Masenko, but Toei had the voiceactor say Kamehameha. Funimation just had their voiceactor do the same--say Kamehameha.
Yes, Goku never taught it to him, and Piccolo certainly didn't.
I made a clip of it, if anybody doesn't believe me that does indeed say Kamehameha, in the japanese version.
And Hit, just so you know..
Kamehameha is a pun.
Kame-Hame-Ha means "attack of the turtle house,"
and the actual word "Kamehameha" was the name of a Hawaiian king who unified the islands into one nation. King Kamehameha. That's why the attack is named after him, because it takes the power in your entire body, and consolidates into one single spot.