After the Dollars trilogy Leone wanted to do what eventually became known as the "America Trilogy" Once Upon A Time in the West, Once Upon a Time in the Revolution (also known as Die You Sucker), and Once Upon a Time in America are all part of that trilogy.
Your core question was already answered by @Rosie. But i will take a few lines to reply to
Is there a reason the film titles are so similar?
The phrase Once upon a time ... is a very common pattern when starting a fairy tale. So by naming his movie with this prefix, Sergio Leone emphasizes that he is telling a story in the sense of a fairy tale that you ...