I prefer explaining it to you right away.
Gap works between your HIGHEST mastery level and your CHARACTER level. It's only the highest mastery that matters. In your case, your highest mastery is pach 50 and your char lvl is 50 meaning you have 0 lv difference, which leads you to a 0 gap. So if you get lvl 56 and leave all your masteries like they are, then you'll have 56-50=6 gap

I hope it's clear enough