It's my understanding that the paintings in the Quinta Del Sordo were never meant to be seen by anyone, were not named, and also were not found until after Goya's death. Could the paintings not have just been the artistic vision coming from a man losing his mind? how do we know it is in fact a painting of Saturn eating his Child?
"Saturn Devouring His Son" by Goya (1746-1828) is a complex, problematic piece of art - problematic largely because of issues around its identification and interpretation. The short answer to your question is that no one can be sure if the myth about Saturn devouring his infant offspring actually inspired the painting.
Two leading problems with this identification is in the way the painting - if that myth is intended - turns its back on the story. In the Roman myth, Saturn (Cronus in the Greek myth) responds to a prophesy that says he will be overthrown, removed from power by one of his sons. He resolves, consequently, to swallow each of his children after immediately after birth - swallowed whole, so the infant survives to descend into the gut of Saturn. Rhea (Ops/Opis in Roman mythology), the wife of Saturn, decides to deceive her husband by presenting him with a stone in swaddling in place of her sixth child, Jupiter, whom she hides. Jupiter is then able to mature and force his father to disgorge Jupiter's five siblings. He then dethrones his father and takes his place as the head of a new order of gods.
Goya's painting depicts a man chewing a body apart. He is much larger than the body, but it appears to be a mature individual (not a child), and it is clearly dead, unlike the infants who were swallowed whole in the myth. The gigantic proportions of the man compared to his victim does seem reminiscent of the idea of Saturn/Cronus as a titan, but the devouring of the corpse is inconsistent if not irreconcilable with the myth.
There are suggestions that Goya may have known of "Saturn Devouring His Son" (1636) by Peter Paul Rubens (1577-1640). This too has a bit of chewing going on that is inconsistent with the myth, but at least the victim is an infant and is still alive! Goya's victim appears to be the body of a grown woman, but even that can't be taken too far, and nothing is clear.
Goya's work is part of his "black paintings" - painted as murals on the walls of his villa outside Madrid toward the end of his life (1819-1823). These were never intended to be seen - and they were not seen until he left the place, five years before he died. Goya did not identify or comment on the painting, so it is left to subsequent art historians to speculate on the subject and the intention.
Toward the end of his life, Goya suffered from depression. He was also deaf, and the circumstances of his life apparently left him disillusioned. He saw the atrocities of war - at the hands of Napoleon's army, and then under the watch of Spain's monarchy. While in his youth Goya had enjoyed a society that was leaning toward Enlightenment; by the end of his life, much of the Spain he celebrated with early works filled with joy and light had turned to darkness.
This painting may indeed be a reference to the ancient myth of Saturn, but if that is the case, Goya has taken enormous liberties. It is sometimes taken to be allegorical, a reference to the French Revolution, born with commendable ideals, turned into a monster that devoured victims. The same can be said of a Spanish monarchy that was benevolent in Goya's youth but turned into a self-serving monstrosity serving only its own quest to retain power and to enjoy the benefits of the throne.
Ultimately, we can't be sure if Saturn was intended by this famous work of art. Without credible primary sources we are left to speculate. And you or anyone else remains free to accept or reject that speculation. I suspect that Goya was inspired by the story about Saturn's brutal execution of his effort to retain power, but it seems clear that Goya felt free to adapt that core motif in directions that suited himself. Consumed with a depression that was in part the result of the consequences of how the powerful exploited their position, it seems that the painting is both a reference to an ancient myth and a commentary of a bleak time in the artist's life.
edit: correction of a typo thanks to /u/Kufat !!!
edit #2: other issues corrected; thanks for the awards!
edit #3: for some reason the magic of Reddit isn't working well - I'm receiving email notices of comments, but they aren't showing here. Apologies to those who are asking questions - I am seeing some very good questions and comments, but the reddit machine isn't working!!! ...... To the one from /u/Cereborn - you are absolutely correct to point out that among his offspring devoured were three daughters; this, of course, makes little sense given his concern about sons, but then, these things don't always make sense. Aside from the name of the painting and the nature of the prophesy, I kept my comment gender neutral when it came to the victims.