"Top o' the Morning" is considered Irish in origin but is not an expression used there. It turns out that it is shunned by the Irish. It is considered a stereotyping phrase - known as Irishism.
While it occurred in literature in the late 1800's, it was already considered an affection by then. The expression receded from Irish English and entered the American consciousness. It is popularly used in the U.S. when imitating Irish people. Wikipedia has an entry for Hollywood Irish - Irish people and culture as stereotypically portrayed by the movie industry, particularly from the USA. Many people can remember the Lucky Charms ads - full of Irishisms.
The expression's intent is to wish the best part of the morning to the person being greeted. The traditional response is "And the rest of the day to you".
Another idea put forth in forums is that it is a symbolic offering of morning cream that has risen to the top of the milk jug. Both such quaint ideas and reminding us of simple times.
This picture of the Minneapolis Arboretum's Herb Garden was taken from a viewing platform - makes me think of what it would be like to be Gulliver.