Regression to the mean is a statistical phenomenon where in the long run, the results of an experiment average out. Taking the example of one's results on a test, if we've had a string of good outcomes, then the next result is likely to be less satisfactory because things even out, right? If so, how can the probability of success in the next test still be the same as that of the previous tests? How can the gambler's fallacy still be false if we know things must even out?
If we've had a string of good outcomes, the next string of outcomes is likely to be less satisfactory, or closer to the mean, because events closer to the mean are in general more likely, assuming that the distribution of the strings of events is normally distributed. It is not affected by what you have observed so far - it is independently more likely to occur. If there is no mechanism by which past events can possibly influence future events, e.g. like when it comes to the roulette wheel, then the gambler's fallacy is necessarily false.