The gender gap in science subjects like physics is likely to persist for hundreds of years, study suggests.