Sex selection is legal in many places though often only for medical reasons. IVF brings up a lot of ethical issues, I'm not sure that this is any greater than the others.
I've had IVF so I appreciate I am biased but IMO the ethical issues here are cumulative
So you can have the IVF I did, my egg, my husbands sperm, fertilised and back into my body
Or you can for example, have a donor egg
Then you can implant it into another womans body (neither of whom are going to be involved in this childs life)
Then you can demand that it can't be a girl
There are so many layers of ethical issues there, that's the problem for me. Aside from the fairly obvious problems of 'you know who a woman is when you want one to carry a baby and put her life at risk for you' and 'you know who a girl is when you end up with one you didn't want'