Is the validity of the ransom contingent on Jesus being God? In discussing the trinity, I've often heard people say that "only God could perform the ransom" or that "only the creator of life could defeat death." What is the basis for these claims?

To give some context, non-trinitarians, such as Jehovah's Witnesses, believe that Jesus was a perfect man in the same manner as Adam, but Adam was not God, therefore the ransom doesn't necessarily need to be by God, but it does need to be by a corresponding perfect man. (Romans 5:12-21; 1 Timothy 2:5, 6)

What is the basis (Biblical or otherwise) for believing that Jesus must also be God in order for his ransom to be valid, especially within the framework of the Recapitulation theory of atonement?
Irenaeus of Lyons is generally credited with being the first to fully present Recapitulation Theory. He explains that Jesus saves humanity be undoing the error of Adam by succeeding where Adam failed. A significant portion of this is to reveal the Father to all (and so includes Moral Influence as part of Recapitulation). The other aspect is the Recreation of Man.

Revelation of the Father

In the preface of Book V of his Against Heresies, Irenaeus summarizes his theory of atonement:


  For it is thus that thou wilt both controvert them in a legitimate manner, and wilt be prepared to receive the proofs brought forward against them [the heretics], casting away their doctrines as filth by means of the celestial faith; but following the only true and stedfast Teacher, the Word of God, our Lord Jesus Christ, who did, through His transcendent love, become what we are, that He might bring us to be even what He is Himself. [Emphasis mine]


So, according to Irenaeus, Jesus's goal is to make us 'what He is Himself' by being 'becom[ing] what we are' to be our 'true and stedfast Teacher'. 

Now, one could argue that a perfect (non-divine) man could do this, but Irenaeus disagrees. He opens Chapter 1 of Book V with 


  For in no other way could we have learned the things of God, unless our Master, existing as the Word, had become man. For no other being had the power of revealing to us the things of the Father, except His own proper Word. For what other person “knew the mind of the Lord,” or who else “has become His counsellor?”


Now this is a reference to Paul's letter to the Romans (which in turn refer to Isaiah, Jeremiah and Job):


  Oh, the depth of the riches both of the wisdom and knowledge of God! How unsearchable are His judgments and His ways past finding out!

For who has known the mind of the Lord?
Or who has become His counselor?

Or who has first given to Him
And it shall be repaid to him? 
  
  Romans 11:33-35 NKJV


Irenaeus is asserting, based on Paul, that only God knows God's mind. He concludes that only the Divine Word of God could reveal the Father to the world. This logic parallels what Christ explained to Philip:


  [Jesus said] "If you had known Me, you would have known My Father also; and from now on you know Him and have seen Him." Philip said to Him, "Lord, show us the Father, and it is sufficient for us." Jesus said to him, "Have I been with you so long, and yet you have not known Me, Philip? He who has seen Me has seen the Father; so how can you say, 'Show us the Father'? Do you not believe that I am in the Father, and the Father in Me? The words that I speak to you I do not speak on My own authority; but the Father who dwells in Me does the works. Believe Me that I am in the Father and the Father in Me, or else believe Me for the sake of the works themselves."  [John 14:7-11 NKJV]


Christ reveals the Father because the Father is in Him and He is in the Father. Of course, it is could be argued that this does not need to mean that Jesus is divine, but Trinitarians certainly interpret it that way. And it is certainly Irenaeus's understanding that Jesus could only accomplish this if He were God.

Revelation as Mediation

You mention 


  For there is one God and one Mediator between God and men, the Man Christ Jesus, who gave Himself a ransom for all, to be testified in due time [1 Timothy 2:5-6 NKJV]


as an example that 'ransom doesn't necessarily need to be by God, but it does need to be by a corresponding perfect man'. I don't think that this is the correct understanding of that passage. Of course, Chalcedonian Trinitarians have no problem with this statement since they affirm that Christ is fully God and fully man, but I would like to place this passage in the context of 1st Century Hellenized Judaism. 

Philo of Alexandria, a Hellenized Jew and contemproray of Christ, provides some insight. Much of theology involves the idea of the Logos, the Word of God. Early Christians may not of drawn directly on Philo, but (especially in regards to Johnian Christology) they like were influenced by the same sources. Philo describes the Word as 'High Priest', 'Mediator', 'Advocate', and 'expiator of sins'. (I need to find a good online source for Philo so I can link to quotes.) 1st Century Hellenized Judaism was not foreign to the idea that Word of God, though God, operated, at least figuratively, independantly of God (the Father in Trinitarian parlance). God (the Father) is too transendent, too unknowable, to be directly revealed to man One of the principle activities of the Word (or sometimes Wisdom) is to be the Mediator between God and man, to reveal God to man. (Recall that Irenaeus asserts that this why Christ came.) 

To a 1st Century Hellenized Jew, the phrase 'there is one God and one Mediator between God and men, the Man Christ Jesus' would be shocking because it identifies the Divine Logos, the Mediator between God and men as the man Jesus Christ. They were already familiar with the idea that an aspect (loosely speaking) of God was the Mediator that revealed the true Nature of God to man, and that job could only be done by God. The Epistle to Timothy takes that concept at attaches it to a man, thus requiring Jesus to be both man and God. To the Timothy, the verse would sound something like "There is one God and the Logos, who is also the man Jesus Christ, who gave Himself a ransom for all". The ransom must be God because only the Logos could be the Mediator.

The Recreation of Man

You also mention Romans 5:12-21 where Paul famously compares Jesus, the Second Adam, to Adam (the First Adam). Jesus is described as succeeding and bringing life where Adam failed and brought death. This is the heart of Recapitualation. Again, let's take a look at Philo. One of the titles of the Logos is 'the Heavenly Adam'. Recall that Paul calls the Son the Image of God and associates the Son with the 'method' of creation:


  He [, the Son,] is the image of the invisible God, the firstborn over all creation. For by Him all things were created that are in heaven and that are on earth, visible and invisible, whether thrones or dominions or principalities or powers. All things were created through Him and for Him. [Colossians 1:15-16]


Philo made this same connection with the Logos (although, of course, Philo did not identify the Logos with Jesus). The Logos is the Image of God. In particular, this was the tied to the creation of man: 


  Then God said, "Let Us make man in Our image, according to Our likeness; let them have dominion over the fish of the sea, over the birds of the air, and over the cattle, over all the earth and over every creeping thing that creeps on the earth. [Genesis 1:26 NKJV]


In his commentary on this verse, Philo identified the the Logos as the Image of God and the Heavenly Adam. The Earthly Adam was created in the image of the Logos. Paul seems to work along similar lines, but Irenaeus takes it further than Paul. At the end of Chapter 1 of Book V, he concludes 


  [A]t the beginning of our formation in Adam, that breath of life which proceeded from God, having been united to what had been fashioned, animated the man, and manifested him as a being endowed with reason; so also, in the end, the Word of the Father and the Spirit of God, having become united with the ancient substance of Adam’s formation, rendered man living and perfect, receptive of the perfect Father, in order that as in the natural (Adam) we all were dead, so in the spiritual we may all be made alive. For never at any time did Adam escape the hands of God, to whom the Father speaking, said, "Let Us make man in Our image, after Our likeness." And for this reason in the last times (fine), not by the will of the flesh, nor by the will of man, but by the good pleasure of the Father, His hands formed a living man, in order that Adam might be created (again) after the image and likeness of God.


So Irenaeus assets that just as the earthly Adam was created in the image of God, the only way for man to be made spiritually alive was for the Logos to become united to the flesh of Adam.