The origin of the quote "Stay gold, Ponyboy" is the 1967 novel "The Outsiders" by S. E. Hinton. In the novel, Johnny Cade breaks his back while rescuing children from a burning church. As he is dying, he tells his friend Ponyboy Curtis, "Stay gold, Ponyboy. Stay gold."
In the novel, this line is a callback to an earlier conversation, when Ponyboy recites the poem "Nothing Gold Can Stay" by Robert Frost. This poem reflects both Ponyboy's innocence and the ephemerality of a happier time in the boys' lives.
The quote became more well-known in popular culture following the 1983 movie version of "The Outsiders." Ralph Macchio, in one of his earliest film roles, utters the line "Stay gold, Ponyboy" to C. Thomas Howell.