Gunner

If I wanted to get the most out of the Gunner, what kind of race would I have to play?

In general, gender and race matter very little for stats in PSO2, save for some very early equip requirements, so you can pick any race and gender you want with no significant effect on your gameplay.

That said, if you really want to min-max, Female Deuman and Female CAST have the highest RNG-Pwr multiplier (105%), with Male and Female Newman having the lowest (102%); do keep in mind that this is a less-than 25 RNG-Pwr difference at level 80.