The past tense of gain mastery in is gained mastery in.
The third-person singular simple present indicative form of gain mastery in is gains mastery in.
The present participle of gain mastery in is gaining mastery in.
The past participle of gain mastery in is gained mastery in.