I am certainly no expert on the visual arts, but one obvious example is the Black Paintings of Goya. These are a group of fourteen paintings he did between 1819 and 1823 when he was in his early 70s. They are some of the most dark and powerful paintings in history. He painted them directly on the walls of a house in the outskirts of Madrid. They were not commissioned and he gave them no titles and probably never intended them to be exhibited publicly. Perhaps the most famous is this one, "Saturn Devouring His Son"
But there are also a number of examples in music history. I said that this was mostly something that occurred late in life, but the exception to that is the "Sturm und Drang" symphonies of Joseph Haydn. Wikipedia lists eight symphonies, but Trevor Pinnock's excellent recording with The English Concert offers nineteen. The Symphony No. 52 in C minor can serve as an example. This is La Petite Bande, dir. Sigiswald Kuijken:
UPDATE: I should have mentioned that the "Sturm und Drang" symphonies of Haydn were written between 1768 and 1772 when Haydn was thirty-six to forty years old.
But usually, as I said, it was something more likely to come late in life as in the last three symphonies of Mozart, all written in the summer of 1788. Here is No. 40, in G minor, only the second symphony in a minor key by Mozart:
Another stunning example is the last three piano sonatas by Franz Schubert--the Wikipedia article is really excellent. These were all written in 1828 but not published for a decade. The last one of all is particularly powerful:
Yet another example is the late string quartets by Beethoven, composed in 1825 and 1826. These comprise five quartets, plus the Great Fugue. These quartets were Beethoven's last important composition and came after more than a decade when he wrote no quartets at all. This is Op. 127 in E flat:
I'm sure that there are more examples and I invite you to suggest some in the comments. But I think that we can discern certain common qualities among these I have cited. They were all, or nearly all, done with little intention of public performance or exhibition. They were done purely out of aesthetic need, because the artist/composer saw the possibilities and wanted to develop them. They were all, or nearly all, pushing or outside the boundaries of what was the norm for the time. For this reason, most of these examples were not understood or appreciated until many decades later. They were done, mostly, late in life and as a kind of final statement or contribution to the art and humanity. They are all particularly intense and make little effort to ingratiate themselves with an audience.
One final curiosity, all my examples fall between 1768 and 1828, a mere sixty year period. I wonder why that is?