HALF MOON BAY, Calif. — The Pacific Ocean glistens in the distance, past the rolling bluffs that rise beyond the electric gate that blocks off Martin’s Beach Road. The road leads to Martin’s Beach, once a revered hideaway for surfers, fishers and beachgoers drawn by its isolation, dramatic cliffs and sweep of soft sand.

But these days, the future of this hidden beach on the San Francisco Peninsula is being fought in a courthouse 25 miles away, in a battle that has become the latest class-charged standoff involving a wealthy entrepreneur in this polarized part of California. Vinod Khosla, a Silicon Valley venture capitalist, paid $37.5 million in 2008 for a 53-acre parcel of ocean land that includes the beach and the road — and proceeded to close the gate, posting armed guards and signaling that he was prepared to spend what it takes to keep the public off what he contends is private land.

“People are saying, ‘Talk about entitlement: Rich people think they can get away with anything,’ ” said Rob Caughlan, the former president of the Surfrider Foundation, the nonprofit organization that brought the suit. “All we want is to get Khosla to follow the same law as everyone else does.”