The past tense of get the upper hand is got the upper hand.
The third-person singular simple present indicative form of get the upper hand is gets the upper hand.
The present participle of get the upper hand is getting the upper hand.
The past participle of get the upper hand is gotten the upper hand.