Dead lyricist Robert Hunter wrote the words for this one. Frontman Jerry Garcia did the music.
The name Black Peter has five (yes, five) possible references.
The first possibility is the one that came closest to Workingman's Dead album on which this song appeared in 1970.
In 1964, Czech director Milos Forman put out a film named Black Peter, which won the top prize at that year's Locarno International Film Festival. The film is essentially about a young man's troubled relationship with his father and about his awkward attempts to get on as an adult.
The second possibility occurred not too much earlier than the Czech film. In 1958, T.H. White published a book titled the The Once and Future King. The book collects revised versions of three novels published from 1938 to 1940 and adds a fourth. Together they retell the British legend of King Arthur.
In the story, the wizard Merlyn introduces Arthur (called "Wart" in the book) to a fish named Black Peter, King of the Moat. Black Peter is in terrible health as he tells Arthur his corrupted perspective that nothing in life matters except power. Merlyn brought Wart to Peter as part of a series of lessons intended to prepare him to be a good king.
The third possibility is from a folk story about of the Netherlands. Given Robert Hunter's fondness for history, folklore, and mythology, this one doesn't make it any less likely than the others to have been the song's inspiration. Hunter frequently drew from such sources for his songs.
In the Netherlands, Black Peter ("Zwarte Piet" in Dutch) is part of the Feast of St. Nicholas, which is celebrated every December 5 (on the 6th in Belgium). Black Peter gives sweets to kids for the holiday and the people put on parades. An Amsterdam schoolteacher and writer named Jan Schenkman created Black Peter in 1850.
The fourth possibility is the Sherlock Holmes story The Adventure of Black Peter, published in 1904. In this story, Holmes tracks down a man who kills with a harpoon.
Lastly, there is also an old German children's card game named Black Peter. The game is so old its exact origins have been lost to history, but we know it goes back at least as far as the early 1800s.
As usual, Hunter's lyrics are too slippery to really pick out any of the four as the most likely culprit. The song's sung from the perspective of a guy who is lying on his deathbed. Friends come to say farewell, but Peter ends up surviving. The song comes across sad, with the main character pitying himself for his misery.