They're both considered the best knight of their realm, and they're both in love with their king's wife. Unlike Launcelot, though, Trystram always gets caught with the king's wife (clever Launcelot avoids this right until the end). He also isn't quite as faithful to his lady-love as Launcelot is, choosing to marry a different Isode when her dowry and family connections prove too tempting to resist. Also, Trystram excels beyond the battlefield: he's a scholar, linguist, harpist, hunter, and hawker, too.
And, finally, Trystram's lord, King Mark, is a really bad king and a really bad dude in general. He's constantly trying to kill Trystram, whereas Launcelot's lord is the best king in the world, who always keeps his word and who also happens to be best friends with Launcelot. So actually, what we have here are two sets of foils: Launcelot and Trystram, and Mark and Arthur. See how we snuck that one in there?
When Launcelot loses the title of "the best knight in the world," it appropriately goes to his son, Galahad. Who else? Galahad and Launcelot look so much alike that it's immediately clear to anyone who's looking that Lancelot is his dad. Accordingly, we just can't help but compare the two, and they turn out to pretty a lot alike. Both excel at feats of arms and possess a devotion to something outside of themselves that helps them to excel.
But whereas Launcelot's skill on the battlefield comes from his love for Gwenyvere, which spurs him to success, Galahad's comes from God, who rewards this knight who's so devoted to him. That's why Galahad succeeds in the Grail Quest whereas Launcelot fails. And Galahad's success helps us readers to understand one key lesson our narrator hopes we'll take home: the real path to glory and honor is through God, not through jousts and battle.