The past tense of prevent from gaining is prevented from gaining.
The third-person singular simple present indicative form of prevent from gaining is prevents from gaining.
The present participle of prevent from gaining is preventing from gaining.
The past participle of prevent from gaining is prevented from gaining.