Johnny Sokko and His Flying Robot Season 1 (1967)

Shipwrecked, Daisaku (Johnny Sokko) and Juro Minami (an agent for Unicorn) drift to an island and are captured by the BF gang. The island is in fact, a base of the B.F. gang. They happen to discover a huge robot while they are running away.