A lot of people are complaining about Gawyn in this thread. I concur with some of this, but think you've all missed something important.
Gawyn used the Seanchan assassin rings (I forget the formal name) to help Egwene escape the arrival of Demandred and the Sharan army. Meaning he was poisoned at that point -- he wasn't going to survive more than a few weeks anyway. (Whether or not the poison was curable via channeled healing was unclear -- Seanchan damane did not use healing weaves until partway through AMOL.)
As I recall, Gawyn was starting to feel the effects of the poison during the battle at the Fields of Merrilor. He might have known he was on the way out and figured he'd take out Demandred while he could.
Just as important -- Gawyn had always wanted to achieve glory. Hence his earlier hatred of Rand -- he was jealous that Rand had been crowned king and was toppling nations. He came to peace with living in Egwene's shadow in Towers of Midnight, but perhaps not enough.
I agree with critics though, Gawyn needed warder lessons from Lan. When he went off to be killed by Demandred, his challenge would have been received by readers better if he did so under the motivations of either seeking glory or dying of poison.
(BTW, anyone else agree that Gawyn seemed to fare better against Demandred than Galad? Had Gawyn also given his rings to Galad, the ring-medallion combo might have been enough for Galad to take him. As it stood though, I didn't find Galad's challenge to be particularly well done.)