Is it Halachicly allowed to chose the gender of your child or does Halacha frown upon this practice?
They can do changes in diet or segulahs to their heart's content. (Though they may speak with a rabbi if that's a spiritually wise idea.) Anything more medicalized than that is probably a bad idea in most cases.
Rabbi Barry Freundel spoke about this at a medical ethics conference around 2005.
Suppose a couple has IVF, for whatever reason; let's assume there is some serious hereditary disease they can test for, so they have a big bunch of embryos, and they test them (some are healthy, some have the disease) before picking one or two (or three) to implant. Judaism says that the remaining embryos can be discarded, they don't have sanctity of life. (As ruled by Rabbi Elyashiv.) Rabbi Elyashiv was asked, "can you pick out only the male (or female) ones?" He replied -- "if you can throw them all away, then you can pick whatever you want!"
But this concerns a couple who needed IVF for some significant reason (infertility otherwise, or avoiding some horrible disease). IVF is complicated and exhausting enough that I strongly doubt anyone would do it just for the sake of picking gender.
Rabbi Freundel explained that just about any technique in fertility medicine today is halachically complicated in some way; now many of them are allowed for various needs, most commonly the pain we feel for the childless couple. But "oh how horrible, the Goldsteins only have girls" just doesn't ring true the same way. If there was a pill that a man could take that would cause him to only create XY (or only XX) sperm for the next few days, fine we could talk about it; but any other method today has halachic costs without halachic benefit. (Well some think changes in diet and exercise can influence things; if that works, sure fine. The question is serious medical intervention.)
There may be a specific situation where there actually is emotional strain on the couple to produce a boy; that's a different story. But generally, "you get what you get and you don't get upset."
Rabbi Freundel argued convincingly that it's erroneous to say "oh it's a good idea to use medical interventions to pick gender, as the fulfilment of Peru Urvu is done by having a boy and a girl. It's unclear whether one fulfils Peru Urvu with artificial insemination (let alone IVF) anyhow; and more significantly, the only obligation of Peru Urvu is to marry someon who appears to be fertile, and then to go about normal life. The Talmud is full of recommended practices to better your odds towards having a boy (some of which may be "to better your odds of having the gender you prefer"); yet nowhere does it say that any of these segulahs should be reversed or halted if you have a bunch of sons but no daughters. Why? Because Peru Urvu doesn't ask that of you.