It's a G natural, the flat goes away at the end of the measure, unless it is in the key signature. In this case it is not in the key signature, so it is simply played as a G natural.
Just as a caution, this piece is very difficult. I'm not saying you shouldn't play it, just take a look at the C sharp minor section first.
