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