It happened to me! My "girl" is actually a beautiful an almost 12 year old boy!
My first ultrasound was at 18 1/2 weeks. The technician said she was 99% sure it was a girl. I had already had a boy and there were a lot of people who wanted me to have a girl. I asked the tech if she'd ever been wrong. She said she had been wrong only once in 20 years and, in that case, there was something wrong with the baby and it was hard to tell for sure. I still had this little doubt in the back of my mind while the rest of my family celebrated. When people asked me what I was having I would say, "Well, supposedly it's a girl but we'll see when I have it."
I had another ultrasound at 37 weeks with the same technician. I asked her to make sure it was a still a girl so she checked that first. I watched her face sink and her forehead wrinkle as she said, "I'm seeing testicles!" She took all the measurements and said he was a perfect baby boy. I asked her how she could have been wrong and she gave me a pretty simple explanation. The boy parts develop inside of the body and drop down at some point, up until 32 weeks. I asked her why she would say she was 99% sure it was a girl when there was still a good chance it could be a boy. She said she didn't know and she wouldn't do that anymore.
A week later, I had a beautiful 9 lb., 12 oz. boy. He's a wonderful person and I wouldn't give up knowing him for the world! Although it's not common, ultrasound technicians can be wrong.