I would define "hit" as appearing on the Billboard Hot 100, or other countries' equivalents.
Billy Murray - Come Take a Trip in my Airship (1905)
The Billboard 100 didn't exist at the time of its release, but from the small amount of information I can find online, I understand that this was a popular phonograph recording. Certainly Billy Murray was a very popular artist at that time, but I don't have hard information on whether was one of his greatest hits. It is, however, listed as a hit in this almanac of early 20th century hits. (Google books link).
The song itself pre-dates Murray's recording and is obviously originally written for a female singer. The airship in the title takes a tour around the Solar system and the Milky Way, making it very clearly influenced by the science fiction of the time.
TL;DR: I can think of two early Science Fiction songs - one made the Hot 100 charts; the other predates the Hot 100 charts, but was recorded by one of the most successful musicians of the early 20th century. Purple People Eater by Sheb Wooley, and Two Little Men in a Flying Saucer by Ella Fitzgerald.
Purple People Eater by Sheb Wooley
This one definitely meets all your criteria.
You're not going to find an earlier sci-fi song that made the Billboard Hot 100 charts, because this song was released the same year that the Billboard Hot 100 charts began.1
The song is about a man-eating alien who comes to earth to join a rock band.
Two Little Men in a Flying Saucer by Ella Fitzgerald
Released in 1951, this single didn't hit the Billboard Hot 100 charts because the Billboard Hot 100 charts weren't invented until 1958. However, Fitzgerald had been one of the most popular musicians in the world for decades by the time she released this song, so it is worth mentioning.
The song is about two aliens who visit earth, decide humans are psychotic morons, and quickly leave.
Mr. Spaceman, The Byrds - 1966
A Space Oddity, David Bowie - 1969
1Prior to 1958, Billboard had charts of popular songs (beginning in 1941), but they were limited to the bestselling song of each week; because songs tended to be bestsellers for many weeks, the charts for a year might include as few as 3 songs.
I looked through the bestsellers lists from 1941 to 1957, and there are no songs that clearly fit the sci-fi criteria. The ones that come closest are as follows:
The Gypsy, The Ink Spots - 1946
Mr. Sandman, The Chordettes - 1954
2B-Side to the hit Rock Around the Clock; credit to user14111 for the suggestion. The single Rock Around the Clock/Thirteen Women was released in 1952 with the latter track as the A-Side; it didn't do very well. When the song Rock Around the Clock was used in the 1955 film Blackboard Jungle, the single was re-released with Thirteen Women as the B-Side, and topped the charts.
This may (also) be a controversial answer. It's hard for me to address the popularity of this song in the context of a country, such as the United States, because it's not meant for that demographic.
This song is a Latter-day Saint hymn, first published in 1842. Among the LDS, the song is incredibly well know. I'm sure the 6 million+ LDS living in the US alone have all heard the song, or will here this song, many times in their life. That's a population greater than all but the top 110 or so countries, and that's without including international LDS members. There are also over 9000 (yes, seriously!) covers of this song on YouTube (and that's after removing the Mormon Tabernacle Choir).
The song is titled If You Could Hie to Kolob. While it is a religious piece, it has some very science-fiction-like elements when pondering the universe:
It has lyrics about being instantly transported to a distant planet named Kolob. Note that Kolob is the inspiration for Kobol in Battlestar Galactica.
Then, the lyrics are about flying through space, throughout eternity, to see the beginning and end of the universe. It also addresses a continuum of space and time.
Disclaimer: I don't mean to offend anyone by suggesting this religious piece, as I'm not calling the religion fiction. Just as Orson Scott Card and Brandon Sanderson have used their Sci-Fi and Fantasy to do so in their novels, I've always found these lyrics to be very Sci-Fi, as a way to ponder the ways and mysteries of the their god.
I would like to point out that I suggested this in appreciation of a song I've always enjoyed.
Allow me to be a little loose with the definition of "sci-fi" and I'll give you Santa Claus Is Coming To Town, first premiering in 1934.
While it was a bit too early in pop music history to have accurate numbers on popularity, at least one cover of the song, by The Four Seasons, made it to #23 on the Billboard charts.
This answer, of course, depends on whether or not you consider Santa Claus to by supernatural sci-fi, or supernatural fantasy. But the lyrics "sees you when you're sleeping" and "knows when you're awake" seem like clairvoyant powers, to me!
If you like Santa Claus songs, there's also "Up on the Housetop" by Benjamin Hanby, written in 1864. The song is one of the oldest about Santa Claus. It's been popular and famous since its inception, and some of the covers have been incredibly famous. Kimberly Locke's 2005 version:
The notable sci-fi element in this song is the reference to the flying reindeer with "Up on the house top reindeers paused," aside from the modern Santa Claus reference in general.