The problem lies with the teacher. If your child can perform well outside of her classroom, but not in it, the problem lies with her. It might not be purely that she is deliberately marking him down, he might be distracted in her class, due to someone bullying him or doing something else to draw his attention away. But even if that is the case, she needs to take control of her class and make sure it is an environment that is conducive to every child performing optimally. We as parents are asked to take responsibility for a lot these days, and obviously you are, but we cannot be held responsible for what happens in the classroom, she needs to sort it out.
Having said that, if she is playing favourites and picking on your child for whatever reason, she needs to be set straight. If you do not have confidence that she will treat your child fairly, ask to have him transferred to a different class. Teacher have a big influence on how children see themselves, and if she keeps picking on him, or his marks do not improve, he might start viewing himself as a student who only has the ability to achieve 2's and 3's. She can really impact his self confidence and that might take years to correct...