Professor Dame Jocelyn Bell Burnell, a leading astrophysicist, said advice from parents, older sisters, aunts or cousins had a powerful negative influence on the choices talented female pupils made.
She also called for greater efforts from schools and universities to encourage girls to pursue careers in science and to ensure the academic environment was more family friendly.
The warning comes amid continuing concerns over a shortage of female scientists and engineers, with just 36 female professors of physics across the UK in 2009/10 compared to more than 600 males.
Last week, a study from the Organisation for Economic Co-operation and Development (OECD) stated that girls lacked confidence in their ability in maths and science and are therefore put off from applying for jobs in engineering and computing.
Dame Jocelyn made her comments after the Royal Society of Edinburgh, Scotland's national academy of science and letters, unveiled her as its president-elect - the first time a woman has held the post in its 230-year history.
She said: "It takes a very long time to change society and this is a cultural phenomenon. It is our sisters and our cousins and our aunts saying that women don't do physics.
"You can convert the teachers and you can convert the kids, but if they go home saying they want to be a physicist and the parents question why they would want to do that then it makes it very difficult. Things are changing, but very slowly."
Dame Jocelyn also spoke of the difficulties she encountered in the 1950s studying science at school in County Armagh, Northern Ireland, where she was born, and the sexism during her time as an undergraduate at Glasgow University in the 1960s.
She said: "I remember in the first week of secondary school a message went round the class that the girls should go to one room and the boys to another for a particular class.
"I thought they were separating us because of sport, but in fact they had sent the boys to the science lab and the girls to the domestic science room.
"I protested and told my parents and I was allowed into the class the next day with a couple of other girls. When I came top in the exam at the end of term I got the idea I could do science."
After leaving school she read physics at Glasgow University, but found attitudes there just as troubling, particularly as the only female in a class of 50 students.
She said: "There was a curious tradition in Glasgow at that time that when a woman entered the lecture theatre all the guys stamped and whistled and cat-called. That was prevalent right through my undergraduate days.
"We would call it harassment these days, but it was the tradition. The academic staff knew it was going on and did nothing to stop it."
Dame Jocelyn, who will begin her three-year tenure as president of the Royal Society in October this year, is credited with one of the most significant scientific achievements of the 20th Century.
She was a doctoral student at Cambridge University when she discovered the first pulsars - rapidly spinning neutron stars formed in supernova explosions.
The discovery won a Nobel Prize in 1974 - although not for Dame Jocelyn, but for two male superiors. Since then she has become one of the UK's most prominent female scientists.
During her distinguished career she has been president of both the Institute of Physics and the Royal Astronomical Society.