No, taking birth control pills during a pregnancy does not harm the baby or the mother. This information comes from large studies of women, many who did not know they were pregnant while taking pills.
At the same time, the package insert for birth control pills says pregnant women should not take them and rates them as a class "X" medication for use in pregnancy. This can be confusing. The reason is that the class is determined by the benefit a medication provides during pregnancy measured against any possible harm it might cause. Since birth control pills don't provide any benefit to the pregnant women, they are automatically given an "X" classification. In this case, this should not be interpreted as possible danger to the pregnancy.