It's hard to explain it, but I guess the word "happening" is the closest. Or imagine it as a posh way to say "to be".
In your example, it would be translated by "if it happens to be a girl.../if it is a girl..."
You could have "De quoi s'agit-il ?" and now it would mean "what is it?/what's going on?/what's happening?"