when a direct object pronoun (the "l'" here) is used with the passato remote verb tense, the ending of the past participle must agree in number and gender with the direct object referred to. l'hai incontrato would indicate a masculine direct object. l'hai incontrata would indicate a feminine direct object.
Notes regarding participle agreement with pronouns:
(1) mi, ci, ti, and vi have optional agreement when the verb takes avere (not essere)
(2) the rule applies only when the pronoun precedes the verb
taken from: Italian Verbs and Essentials of Grammar' Carlo Graziano, 1987, p. 30
Does the "incontrato" in this sentence imply "for the first time," or can it generally be used like "meet" or "encounter" in English? Would first-time encounter be "conosciuto?" I ask because "did you meet him recently?" implies "for the first time" to me, while "have you met him recently?" implies a general occurrence of seeing someone.