The story of Troilus and Cressida is a medieval tale that is not part of Greek mythology; Shakespeare drew on a number of sources for this plotline, in particular Chaucer's version of the tale, Troilus and Criseyde, but also John Lydgate's Troy Book and Caxton's translation of the Recuyell of the Historyes of Troye.
Chaucer's source was Il Filostrato by Boccaccio, which in turn derives from a 12th-century French text, Benoît de Sainte-Maure's Roman de Troie 
The story of the persuasion of Achilles into battle is drawn from Homer's Iliad (perhaps in the translation by George Chapman), and from various medieval and Renaissance retellings.
The story was a popular one for dramatists in the early 17th century and Shakespeare may have been inspired by contemporary plays. Thomas Heywood's two-part play The Iron Age also depicts the Trojan war and the story of Troilus and Cressida, but it is not certain whether his or Shakespeare's play was written first. In addition, Thomas Dekker and Henry Chettle wrote a play called Troilus and Cressida at around the same time as Shakespeare, but this play survives only as a fragmentary plot outline.