The gender issue and the fact that Wonder Woman is the rare female-led superhero movie could have been an issue to some degree, but then it doesn’t explain the success the film saw elsewhere.
Some countries in the Middle East actually tried to ban the movie in protest of Israeli born Gal Gadot, but the United Arab Emirates saw Wonder Woman do almost as well as Spider-Man: Homecoming, so that doesn’t explain things entirely either.
Of course, the question becomes, why were things so different for Wonder Woman than they have been for most other superhero movies?
There likely isn’t a single answer to the question.