A holy place to the north of Kerala. There are many stories about its origin.
Once, on the banks of the Tungabhadra, there was a village that was blessed by the brahmins who stayed there. In that village there lived a brahmin named Atmadeva. His wife was the quarrelsome Dhundhuli and they had been childless for long. Atmadeva was dejected and set out for the jungles. On the way, he came across a beautiful lake. After refreshing himself he sat down on its banks to rest, when a sage approached him. They began conversing and Atmadeva finally asked him for a boon so that a son might be born to him. The sage meditated for a while, studied Atmadeva’s horoscope and said that Atmadeva would be childless for seven births and renunciation would be a better path for him. But Atmadeva refused to heed this and insisted on a child. The sage gave him a fruit and said that he should give it to his wife and ask her to maintain a vrat for a year. He came back and though his wife took the fruit, she found the vrat a tedious task. But she knew her husband would insist. Her sister arrived there then. She told Dhundhuli that she was pregnant and was willing to sell her child and Dhundhuli could tell her husband it was hers. She also advised Dhundhuli that she should claim to have eaten the fruit and become pregnant. Dhundhuli liked this and they also agreed to give the fruit to their cow. Their plan worked as they desired and the child was named Dhundhukari. The cow gave birth after 3 months to a human child, whose ears were that of a cow. It was named Gokarna. Dhundhukari and Gokarna grew up together, with the former turning out to be a tyrant and the latter a scholar. Dhundhukari even started ill treating his parents. The dejected Atmadeva took Gokarna’s advice and became a sage, attaining salvation later. Dhundhuli committed suicide by jumping into the well, and Gokarna set out on a pilgrimage. Dhundhuli became a robber and started staying in the house with prostitutes. The king’s soldiers tied him up one night and set fire to him. He became an evil spirit. Gokarna returned when he heard of his brother’s demise, and started gaya shradh rituals to get salvation for his brother’s soul. But the spirit was not set free and visited Gokarna. Gokarna was undaunted and asked it for details. The spirit begged Gokarna to help him attain salvation, but Gokarna couldn’t understand why it wasn’t released despite the ritual. He asked scholars for help and as per their advice, began praying to Surya. The sun god appeared and said that seven days of Bhagavata chanting would earn salvation for the spirit. He began the ritual and the spirit too arrived to listen. But since it couldn’t get a place to sit, it hid inside a saptagranthi bamboo. After the first skanda was read on the first day, the first granthi was penetrated. After seven days, all seven layers were penetrated, and after the twelfth skanda was read, the spirit left for Vaikuntha, after thanking Gokarna for the ritual. Gokarna asked why others who were there hadn’t attained salvation and the spirit said that it was the only one to have paid full attention. Gokarna conducted one more Bhagavata ritual and this time everyone paid attention. At the end of it, all who attended were taken to Vaikuntha on Vishnu’s chariot. This place later came to be known as Gokarna as per Bhagavata Mahatmya Chapters 1-3.
Ravana’s mother Kaikasi was a devotee of Shiva. Indra once stole the idol she used to worship. Ravana heard of this and promised that he would get her Shiva’s own idol from Kailash itself. He began meditating upside down in the middle of a fire, in Kailash. At the end of each 1000 years, he cut off one head and threw it into the fire. Thus he lost 9 heads and when he was about to sacrifice the tenth, Shiva appeared and asked what he desired. Ravana asked for 3 things – immortality, atmalinga and a wife as beautiful as Parvati. Shiva gave him immortality on the condition that Ravana would not harm him, atmalinga under the condition that he would not place it on the ground, but said that no one was as beautiful as Parvati and that Ravana should not ask for that boon. But Ravana refused to relent and so Shiva gave him Parvati. On the way back, he met Narada who told him that Shiva didn’t have the ability to grant immortality and that he had been cheated. A furious Ravana uprooted the Kailash mountain and threw it, thus breaking the condition that he would not harm Shiva. Thus he lost his immortality. He carried Parvati on one shoulder, the atmalinga in one hand and continued. The devas were worried and Parvati cried out to Vishnu for help. Vishnu appeared as a brahmin and asked Ravana where he had gotten the old woman on his shoulder from. Ravana ignored him but looked over his shoulder, and to his surprise, found an old woman. Parvati had used her sorcery. He left her there and continued with the atmalinga. On the way, his stomach got upset and he wondered how he could stop himself from keeping the atmalinga down. He saw a cowherd (Ganesha in disguise) and asked him if he could hold the atmalinga. The lad agreed but asked Ravana to come back within a specific time. Ravana couldn’t make it back in time, and the lad kept the linga on the ground and left. When Ravana returned, he saw the linga transformed into a cow and burrowing its way into the ground. Ravana barely managed to catch hold of the cow’s ears, and they remained firmly there. This place came to be known as Gokarna as per Sthalapurana.
Mitrasaha, who became famous as Kanmashapada later became an asura because of Vasishta’s curse. He prayed at Gokarna to earn salvation. See Shivaratri.
After Bhageeratha got Ganga to flow into bhuloka, she took various paths to the sea, which caused a rise in sea level, sinking Kerala and Gokarna. The sages meditating in Gokarna barely escaped and made their way to the Sahayadri. They told their story to Parashurama who reached Gokarna and threw a winnowing basket (shurpa) into the ocean. The ocean went back all the way until that point where it fell and this land came to be known as Kerala, as per Brahmandapurana Chapter 97.
Bhageeratha meditated at Gokarna to get Ganga to flow into bhuloka as per Ramayana Balakanda Sarga 42 verse 12. A snake named Shesha lived here for long as per Mahabharata Adiparva Chapter 36 verse 3. Arjuna visited Gokarna during his pilgrimage as per Mahabharata Adiparva Chapter 226 verse 34. Shiva used to stay here too, and Brahma and other devas prayed to him here as per Mahabharata Vanaparva Chapter 35 verse 24. Gokarnatheertha is famous in all 3 worlds as per Mahabharata Vanaparva Chapter 88 verse 15. Gokarna is a tapovana as per Mahabharata Bhishmaparva Chapter 6 verse 51. Nikumbha, who kidnapped Bhanumati, was killed by Arjuna, Krishna and Pradyumna in Gokarna as per Vishnupurana Chapter 90.