The past tense of gain one's confidence is gained one's confidence.
The third-person singular simple present indicative form of gain one's confidence is gains one's confidence.
The present participle of gain one's confidence is gaining one's confidence.
The past participle of gain one's confidence is gained one's confidence.