Also known as the "flag salute", it was the official salute created to accompany the American Pledge of Allegiance, written by Francis Bellamy in 1892. Bellamy, a minister who was working for children's magazine The Youth's Companion, was given the task by the institution's patriotic owner to write a pledge of allegiance to the flag, which came to include the gesture, reminiscent of ancient Roman homage.
From The Youth's Companion, 1892:
'At a signal from the Principal the pupils, in ordered ranks, hands to the side, face the Flag. Another signal is given; every pupil gives the flag the military salute -- right hand lifted, palm downward, to a line with the forehead and close to it. Standing thus, all repeat together, slowly, “I pledge allegiance to my Flag and the Republic for which it stands; one Nation indivisible, with Liberty and Justice for all.” At the words, “to my Flag,” the right hand is extended gracefully, palm upward, toward the Flag, and remains in this gesture till the end of the affirmation; whereupon all hands immediately drop to the side.'
The United States might be using this pledge to this day, but for obvious reasons Congress amended the Flag Code December 22nd, 1942 to the current gesture of placing one's hand over the heart. It would seem that by the mid 1930's, two European countries had started saluting their dictators in this same Roman fashion, leading to a bit of confusion.