To earn the In Your Element achievement/trophy in Gotham Knights, you must “Inflict Elemental Effect on enemies 50 times”.
There are several types of elemental damage in Gotham Knights: bioelectric, concussive, cryogenic, incendiary and toxic, which can spawn on melee and ranged weapons. For the purposes of earning this achievement, the element doesn’t matter, just as long as you have a weapon capable of inflicting elemental damage. Once you’ve met that simple condition, you just need to hit enemies with said elemental weapon until they’re afflicted by an elemental debuff.
Once you have a decently-leveled elemental weapon with as much Elemental Effect Buildup as possible, you just need to hit an enemy with it until they’re debuffed. Each hit will fill up a radial elemental debuff icon above their heads, and when filled, they’ll be debuffed. This brings up another potential complication - enemy durability. Regular-tier enemies may simply not survive enough hits to be debuffed, especially if you’re using a high level/quality weapon. There’s not much you can do about this, as your garden variety goon is notoriously squishy, but veteran or champion level enemies should be strong enough to withstand your attacks long enough to end up debuffed. Failing that, the informant enemy at every opportunistic crime should be durable enough for your needs.
Get yourself a good elemental weapon and go out of your way to inflict elemental debuffs when you’re out on patrol, ideally while you’re working on other objectives. With a little bit of effort ahead of time, you should knock out this achievement without having to expend too much effort on it.