The canned response: The Church is not against science.
The complex response: I understand the situation your friend and his wife were in, but in vitro fertilization is an evil because it reduces a child to the status of a commodity or an accessory. Now, I’m sure they love their child, I’m not saying they don’t - I’m **certainly **not saying they shouldn’t love him - but IVF is wrong because it decides to circumvent God’s design. Marriage does not transmit a “right to have a child,” only the right to perform those acts which can lead to the procreation of a child.
On another level, IVF is distructive; it creates multiple embryos, one or more are implanted in the womb, and then the others are discarded. In Catholic understanding; wholly unacceptable and outrageous.
The child, however, is a child no matter how he came to be. He is not “second-rate”, or the result of sin, or any other whacko accusation that can be thrown around. If you don’t agree, that’s fine I can’t do anything about that, but Catholic moral teaching that deals with sexuality is based entirely on the dignity of the sexual act and on the rights of the child to be born.
As for leaving the Catholic Church, I hope not, but it is a mortal sin to participate in IVF and should be brought up in Confession, and of course should not be done again.
In conclusion, the Church is not opposed to science, only to methods that are immoral. Also, God really didn’t “invent science” because science is an investigative method; IVF is not “science”, it’s only a method of artificial procreation.