Susan Gunn is a slender, pretty woman married to Robert, an investment manager. Robert is a martial arts fiend and has a coiled-up, physical intensity that suggests he could, with one flick of his pinkie, pluck out your carotid artery. Of course he wouldn't – he's a most genial man – but that impression must help in his line of work.

The Gunns live in a nice suburban street in the south of England with their three small boys, but there is not a toy or half-chewed rusk to be seen. We sit around a glass coffee table. The room is clean and modern, the furnishings are that chicken soup colour favoured by architects – and expensive private clinics. Which is just where they are heading. The Gunns want a baby girl. They are off next week to California to undergo in vitro fertilisation using a screening process called preimplantation genetic diagnosis (PGD).

The couple seem slightly bemused. Not so much because they are travelling halfway round the world for a fantastically expensive and invasive treatment. But because they can't quite understand how they ended up having three boys in the first place. "Robert had always wanted a girl," Susan says. "We learned that our first child was a boy, and that was fantastic, and we kind of expected the next one to be a girl." Robert adds: "We were on the 'girl diet' for months. No red wine, no red meat, no coffee, and you had to have white rice and fish and chicken. It was quite bizarre. My friend was on it, too. He had a girl."

Robert and Susan had a second boy. "But in my family, and in Robert's, there are two boys and then two girls," Susan says. "I looked at my Christmas card list. Very weirdly, most of our friends have got two boys, and the ones who did go on to have a third child had a girl. Irrationally, I began to think to myself, 'Oh, this is how it is going to be… you have two boys and then you get a girl.' "

But the Gunns got a third boy.

They are, of course, thrilled. But, Susan says, "I got sick of walking down the high street past BabyGap and seeing these delightful little girl outfits in the window and just getting this pang. This is an area of our lives that we can't influence unless we pay for it. Hmm, that doesn't sound very nice but…" Robert, head down, shoulders hunched, adds: "We often get what we want in our lives. But we work for it."

And they did work for it. They trawled the internet and found the Fertility Institutes clinic in Los Angeles, run by Doctor Jeffrey Steinberg. They spoke to him on the phone. They booked in. Susan had the blood tests and has started the course of drugs, and soon they'll be off to LA. They'll take the boys with them, and visit Disneyland between the egg harvesting and implantation. Steinberg's clinic is a slick operation. It provides payment plans, a travel agent, a list of restaurants and hotels, and a babysitting service. Total cost: £25,000-£30,000.

The couple have told a couple of close friends, and Susan's mother. Nobody else. Robert says, "I won't tell my parents because my mother would use it as a dinner party conversation."

The issue does come up at dinner parties. "Once they've done, 'Ohmigod, you've got three boys!' they do, 'Are you going to try for a girl?' " Susan says. "People have said, 'Oh, I've heard you can do it abroad now. Why don't you just go abroad?' And we just kick each other under the table."

Nicola and Michael Trathen run a property empire and live on the outskirts of Plymouth in a huge, opulently decorated manor house that doubles as a wedding venue. Hosting weddings is just one of Nicola's businesses. Another is a cosmetic surgery clinic offering skin tightening and laser liposuction. A side benefit is treatment on the house. Nicola lifts up her shirt to reveal a perfectly flat, bronzed tummy. "Not bad for six children," she beams.

Ten years ago, the Trathens were in much the same position as the Gunns. They had three boys and wanted a girl. Then Nicola got pregnant again. At 27 weeks she had a private scan to find out the sex of the child. "They were 98% positive it was a girl. But I didn't do the pink nursery thing. I did it all in mint and lemon, just in case."

Which was just as well: the fourth baby turned out to be a boy. "I was shocked," she says. "But it was my little boy, and quite naturally I absolutely adored him. I thought, 'It was you I loved for the last nine months, not a little girl called Zara!'"

So Zara became Adam. And Michael had a vasectomy. "I can remember lying on the bed and just crying because we had decided we weren't going to have any more children and I couldn't have a girl," Nicola says. "I remember seeing someone in town with a little girl all dressed up. I thought, 'I'm never going to have that.' You're not upset with what you have got. You are traumatised by what you haven't got – rightly or wrongly. And that isn't an emotion you can control."

Then came a moment of revelation: "It was April and Adam was two months old. I was sitting there feeding him, the TV was on, and I caught the tail end of this documentary. [Dr] Paul Rainsbury was talking about gender selection and he said it was possible to choose the sex of your child 100%. And it was like a bolt – oh my gosh! I called Mike and said, 'That has got to be fate.'"

Although Michael had had a vasectomy, they were able to extract his sperm, and Nicola went for the initial treatment at the Rainsbury Clinic in London. She had IVF, and went to Spain for PGD treatment. Seven weeks later, Nicola found out she was pregnant with twin girls. She had the nursery prepared – special lights in the shape of the girls' initials, pale, rose-pink walls chosen by a French designer, a bespoke circular cot with a little steeple from which to hang a princess train.

Georgia and ­Danielle Trathen. Photograph: Thom Atkinson

When the twins were born, she called them Georgia and Danielle. They are, says Nicola, "completely different from the boys in every respect. The boys are rough and running around with guns. The girls are usually attached to my side, drawing, doing make-up, nail varnish, watching princess movies and just chatting constantly. Ah! I can hear Danielle."

Out in the hallway are two pretty six-year-old girls in pink shifts. They take me to their bedroom, a bower of pinkness, with a pink plastic princess palace and two pink double buggies, for Georgia and Danielle's twin girl baby dolls.

The twins wriggle and clamber and tumble around the room. They are lovely, lively girls. One has straight blond hair, the other is a curly brunette. One is academic, the other sporty.

Nicola gestures to the two little heads. "You see, a mini me and a mini Daddy – but a beautiful mini Daddy."

Mini Daddy still looks less than pleased: "Don't want to be a mini Daddy."

"That's all right, darling. You can be a mini Mummy, too."

The Gunns and Trathens could never have their sex selection treatment in this country. Unless there are serious medical grounds – such as a parent being a carrier for a sex-linked genetic disease – it is illegal in the UK to choose the sex of your child. The original law, passed in 1993, was further scrutinised in 2003 when the Human Fertilisation and Embryology Authority (HFEA), the regulatory body for reproductive medicine in Britain, held a year-long public consultation.

Any discussion of sex selection is haunted by the spectre of the millions of missing girls of India and China. The 2000 Chinese census showed there were 117 boys under the age of five to every 100 girls. A similar trend is reported in India, which also has a deep-seated cultural preference for boys.

So one fear was that, with sex selection, the population of Britain would become unbalanced. But the HFEA quickly concluded this was most unlikely. Although "a disproportionately high" percentage of couples actively seeking sex selection were non-Europeans preferring boys, overall, families seemed to want both sexes. Other reports suggest a mild preference among Caucasians for girls. (Nicola Trathen says she has been contacted by more than 100 women seeking her advice, and most have wanted a girl.)

However, the HFEA did encounter another stumbling block: "a general moral consensus" against sex selection. In a Mori poll, 82% of the population opposed sex selection for non–medical reasons. As the report said, "A great many respondents felt that sex selection was unqualifiedly wrong because it involved interference with divine will or with what they saw as the intrinsically virtuous course of nature." There was also mention of sex selection being a little farther down a slippery slope towards designer babies.

And then the real clincher: wasn't sex selection for the benefit of the parents, rather than of the child? The report noted that, among some respondents, "The view was that it is one thing to wish to have a child of one sex rather than the other and another thing to take steps to bring it about, since positive intervention in this area changes one's relationship to the outcome, replacing hopes with expectations… Respect for the future child's value as an individual precludes the exercise of control by parents over the kind of child it is to be, including over its sex."

The HFEA concluded that the benefits of sex selection were "at best debatable and certainly not great enough to sustain a policy to which the great majority of the public are strongly opposed". The authority recommended a continuation of the ban.

In 2007, the law was tightened further. Until then, there had been a loophole. "Sperm sorting" techniques were regulated only in cases where donor sperm was used, meaning that women who used their partner's sperm were exempt from the law. Today, all sperm sorting is banned.

So British couples wanting to choose the sex of their child must now go abroad, and the most common choice is the US, where sex selection is legal in every state. There is no way of knowing how many women go – people tend to keep quiet about it. But Steinberg's clinic treats 25 to 30 British patients a year, while Rainsbury sees 70 to 80 women. And the famous Genetics & IVF Institute (GIVF), in Virginia, also has a steady contingent of British patients. There are other clinics, too, so the overall figure is probably in the low hundreds.

Steinberg, a bullish, charismatic showman, has been offering PGD for 14 years, but over the last two, he says, "the business has just gone wild". The great majority of his sex selection cases are couples coming for "family balancing". It is rare, he says, for people to sex select when they have no children already. He says he treats these cases with some caution and recommends counselling. (Some clinics, such as GIVF, will carry out only "family balancing", and restrict treatment to couples who already have at least one child of the other sex.)

Ninety per cent of Steinberg's Chinese families come for boys and, for reasons he hasn't fathomed, 70% of his Canadian patients are trying for girls. "The Brits are fairly evenly split, perhaps slightly favouring girls," he says.

"When people come in, we can often tell what sex they want before they tell us," he adds. "We find that if it's the woman who makes the first appointment, 70% of the time they're going to be wanting a girl. If the man calls up, 90% of the time it's for a boy."

The ban on sex selection in the UK provides Steinberg with a brisk business. But he is puzzled by the British attitude. "I trained in Cambridge. The British were the pioneers in in vitro technology. They were the most dynamic and aggressive practitioners and now… Tch. Well, it's a British thing." But a change in attitudes, Steinberg believes, is inevitable. He recalls the public furore 30 years ago when human in vitro fertilisation was first introduced. "I remember somebody left a note on my car saying, 'Test tube babies have no souls.' And now? Now it's a non-issue."

Last year, Steinberg announced his clinics would soon be offering his PGD patients the chance to select not only the sex of their babies, but also their eye and hair colour, and complexion. The public response was not positive, and a month later he backed down. "We dropped it. I'm very open. OK, fine. I realise this is not the correct thing to be doing now." Note that "now".

Whether current science is really able to isolate eye or hair colour – and other fertility experts express doubt – doctor Steinberg's assumption that the public eventually will adopt new technologies, however outlandish they may first appear, rings true. We modify, we adapt and we build new rituals. Sex selection may not be dinner party conversation just yet, but its normalisation is already under way. GIVF gives each family a framed picture of their embryos just before implantation. The institute also holds annual baby reunions, and families come back year after year with their kids. Recently, the institute's first IVF baby got married and a GIVF founder walked the bride down the aisle alongside her father.

We follow advances in medicine, and we are also pushed. Take the foetal ultrasound. Fifteen years ago, when I was pregnant with my first son, every mother had a scan at 18-20 weeks of gestation – it was a standard part of obstetric practice, as it still is today (there is also now an earlier scan at eight to 14 weeks). We were asked if we wanted to know the sex of the child, and some people said yes. Some people, not most.

Since then, there has been a subtle shift. Today, most women know the sex of the child they are carrying – because they can know. The Gunns have always found out the sex of their babies. Susan says, "I used to be a CEO of a company and Robert is a managing director. So can you imagine coming from that mindset and having a baby in your body, and your baby holding a secret and you don't know? In the nicest possible way, I needed to know."

Today, those who decide they would rather wait until their baby is born to discover the sex can feel they are "holding out". Lisa Weinbrenn, a 37-year-old television executive, is pregnant. She says, "I can't tell you what I'm having, and I think that is pretty unique. If I knew, I would have projected a whole future for him or her. I'm excited about that lack of control."

But women such as Weinbrenn seem increasingly to be in the minority. The website in-gender.com gets more than 10,000 British emails a year. The site acts, in part, as a confessional where women – usually with children of the other sex already – post to say that they are devastated not to have a baby girl or a baby boy. Usually it's a girl.

There is a lot of sadness and guilt and desperation. Women express feelings they might not share with their partners, families or, in some cases, with their better selves. The replies are universally supportive. Last month, "English Rose" wrote that she was contemplating getting pregnant and aborting the foetus after the first scan if it wasn't a girl. The replies weren't: "Get a grip, woman! That's illegal." They were more along the lines of, "I'm so sorry you are going through this."

These communities act as a hothouse for what in the past might have gone unsaid. A desire becomes a need, and then that need becomes pathologised. From reading these sites, you might think these women suffered from an illness. Like all good syndromes, this one has its own initials: GD (Gender Disappointment) – sometimes even EGD (Extreme Gender Disappointment). A researcher from the department of sociology and anthropology at the University of Guelph, in Canada, is currently carrying out a survey of GD sufferers.

It is a desire not restricted to go-getting types such as the Trathens or the Gunns, either. Dr Gary Harton, who runs the PGD clinic at GIVF, says, "We get regular workaday folk. He's a cop. She's a schoolteacher. It's just very, very important to them. People will take out mortgages, they'll borrow from relatives. They'll do anything."

At the moment, the cost of IVF treatment is prohibitive, and sperm sorting remains too hi-tech to be reduced to a DIY kit you can buy at the chemist. But, sooner or later, the law in the UK may change. The HFEA is not standing on very firm ground – it does not claim an overriding moral objection, but bases its decision on the fact that most people don't really like the idea of sex selection. This may be true now, but for how long?

As our society becomes ever more commodified, and our sense of self-entitlement grows, so in every field of life we are making that little gear change from hope into expectation. It may be only a matter of time before women are demanding PGD sex selection on the NHS. If the state will fund IVF for a baby, why not for a baby girl? Or a baby boy?

But at the heart of this debate remains the fact that every child, while belonging to one sexual group or another, is unique. When you have a child, you open yourself to that uniqueness – our most intimate of relationships is with a person who starts out unknown to us.

So you choose your child's sex at a price. You compromise a little bit of that unknownness. You chip away at the idea of their uniqueness. And when you do have your baby, you don't get a generic girl. You get Susan. Or Jane. Or Eleanor.

Or Ted.

It is the end of the day and I've just collected Ted, the younger of my two sons, from his school. In the car, I tell him I've been writing about people choosing the sex of their children.

He says, "What did you want?"

"I don't know," I reply. Of course I know. "Before you were born, Granny used to say you'd be 'a little brown-eyed sister for Sam'. And then out came Ted!"

I look at my lovely son. Brown hair, freckles, lunch stains down his front, shirt hanging out. He's fiddling with the radio controls. He always fiddles.

He says, "I mean, if you had a baby now?"

"Well, of course I'd want a girl!"

He says, "Hmm."

"Girls are less trouble, you know."

"Yeah," he says. "But boys are funner."

• Robert and Susan Gunn are pseudonyms.