The best approach will depend on the specifics of your script. There are several options:
#1: You can set up separate <block>s, <trial>s, etc. for girls vs. boys and use /skip attributes to only run those that apply depending on the response to the gender-question. Basic example:
<expt>
/ blocks = [1=genderblock; 2=girlblock; 3=boyblock]
</expt>
<block genderblock>
/ trials = [1=genderpage]
</block>
<block girlblock>
/ skip = [dropdown.genderq.response == "Boy."]
/ trials = [1=girltrial]
</block>
<block boyblock>
/ skip = [dropdown.genderq.response == "Girl."]
/ trials = [1=boytrial]
</block>
<surveypage genderpage>
/ questions = [1=genderq]
</surveypage>
<dropdown genderq>
/ caption = "I am a..."
/ options = ("Girl.", "Boy.")
</dropdown>
<trial girltrial>
/ stimulusframes = [1=girltext]
/ validresponse = (57)
</trial>
<trial boytrial>
/ stimulusframes = [1=boytext]
/ validresponse = (57)
</trial>
<text girltext>
/ items = ("This is the girls-version.")
</text>
<text boytext>
/ items = ("This is the boys-version.")
</text>
#2: You can also do something like in the multi-language IAT, i.e., have participants indicate their gender (instead of their language) and draw from different item sets accordingly:
https://www.millisecond.com/download/library/v4/IAT/MultilanguageIAT/IAT_Multilanguage.iqx