The primary source of Shakespeare's The Winter's Tale, first performed about 1611, is Robert Greene's pastoral romance novel, Pandosto: The Triumph of Time, published in 1588, then republished in 1607 as Dorastus and Fawnia.
Contrary to Shakespeare's usual practice of making wholesale changes to his source material by adding and changing characters and events—even changing history for many of his historical characters—in The Winter's Tale he adheres fairly closely to the plot and characters of Pandosto.
A principal difference between the novel and the play is that while Shakespeare's play is fairly dark and serious at times, Green's novel is far darker in tone throughout its entire story. Notably, whereas The Winter's Tale ends with the reconciliation of King Leontes and his wife, Hermione, seemingly brought back from the dead after sixteen years, Pandosto ends with Pandosto's suicide over his betrayal of Egistus and the death of his wife, Bellarias.
As for characters, Shakespeare adds Paulina, the outspoken lady-in-waiting to Queen Hermione (aren't all ladies-in-waiting outspoken in Shakespeare's plays?), who hides the supposedly dead Hermione for sixteen years. Another addition, Paulina's husband, Antigonus, is famously chased offstage and presumably killed by a bear—an event which doesn't occur in Pandosto, and which is entirely the product of Shakespeare's mind.
For comic relief, Shakespeare adds the character Autolycus, a roguish and witty singer, cutpurse, and pickpocket. Shakespeare also cleverly combines Greene's characters of Franion, a servant to Pandosto, and Capnio, a servant to Egistus, into Camillo. He is at first a loyal advisor to King Leontes, and then changes his allegiance to King Polixenes when Leontes orders Camilla to poison the other king.
Shakespeare also adds the sheep shearing festival to act 4 of The Winter's Tale, but aside from these changes and other minor changes and additions, Shakespeare remains relatively true to the plot and characters of Greene's Pandosto, even to the remarkable sixteen-year break in the action of the novel which occurs in The Winter's Tale between acts three and four.