The protagonist in A Connecticut Yankee in King Arthur's Court uses this phrase:
But that should be nothing to his discredit; the man that can do THIS kind of miracle knows enough to keep hotel.
This led me to find another passage, this time in Twain's Notebooks, containing the phrase:
It is an art apart. Saint Francis of Assisi said, "All saints can do miracles, but few of them can keep hotel."
I still don't know what to make of it, though.