Epigram means a wise or witty saying. Here are a few examples:
“Genius without Education is like Silver in the Mine.”- Benjamin Franklin
“Keep our eyes wide open before marriage, half shut afterwards.” – Benjamin Franklin
Epigraph, on the other hand, means an engraved or carved inscription on something; such as, a statue or building: “The epigraph over the entry to the building gave the date when it was built.”
It also means a quotation at the beginning of a book, chapter, or section of a book, usually related to its theme: “There is an appropriate and amusing epigraph located every so often in this dictionary.”
The epigraph on the stone which marked the grave of the author quoted a portion of an epigram from his friend. The complete epigraph may be seen in his book.