Gokarna is bnot yet much explored place. i did a solo trip last month to gokarna, murudeshwar and jog falls.And trust me the town is so beautiful and safe. the beaches in gokarna is very clean and less crowded. One can just sit and relax near the beach. The sunset from frtom kudle beach should be in your itinerary which is not to be missed. the main town is about 10kms from the railway station. One can rent a bike to explore this beautiful solo.
Sorry, I saw your question late. I guess by now you must have travelled to Gokarna. if not then please know that Gokarna is absolutely safe for solo female travelers. If you can ride a bike, hire a scooty (₹350 on weekdays and ₹600-₹700 on weekends) and explore this sleepy little town. The shacks and cafes are open well until 10-1030 however it can get very dark post sunset, the roads leading to Om Beach, Kudle Beach, Belekan Beach are dimly lit and desserted. However, the area around Gokarna Main Beach is more bustling because that's where the local village is. If you are staying in hostels you end up making friends.