Stephen Hawking in his book A Brief History Of Time mentions "... idea was elaborated by Ptolemy in the second century AD into a complete cosmological model. The earth stood at the centre, surrounded by eight spheres that carried the moon, the sun, the stars and the five planets known at the time, Mercury, Venus, Mars, Jupiter and Saturn. "
Ptolemy was born in 100 AD while it is believed that telescopes were invented after 1600. Stars could be seen but not planets. How was he able to know that there are five planets?
I'm not sure that there is much to write here. You can definitely see the first five planets with the naked eye, I've seen both Venus and Mars in the past and I'm not a particularly avid star-gazer. And although they look more or less like stars, you can distinguish them because the planets move around relative to one another and the background stars, while stars stay in the same position relative of one another.
So while technically late antique and medieval commentators thought of planets as stars, they distinguished those stars, called in Greek πλάνης (plánēs) and in Latin planeta, which wander around in the sky. Hence the name, which in Greek means "wanderer".
This is all explained, just for example, in the most important medieval encyclopedia, the Etymologies of Isidore of Seville:
Planets are stars that are not fixed in the sky as the rest are, but are carried through the air. They are called ‘planets’ (planeta) from the word πλάνης, that is, ‘wandering,’ for sometimes they are carried to the south and sometimes to the north, and they are often carried against the cosmos, and sometimes with it. Their Greek names are Phaethon, Phaenon, Pyrion, Hesperus, and Stilbon. The Romans have consecrated them with the names of their gods, that is, Jupiter, Saturn, Mars, Venus, and Mercury. Themselves deceived, and wishing to deceive others into the worship of those who had granted them something in accordance with their desires, they would point out the stars in the sky, and say that this one was Jupiter’s and that one was Mercury’s, and this vain belief was born. The devil strengthened this erroneous belief, and Christ overturned it. (3.71.20-1; trans. Barney et al.)
I think you are mistaken in your assumption that planets cannot be seen without a telescope. I would encourage you to go outside tonight and look for some. If you happen live in the Northern hemisphere, Mars would be visible to the South for most of the night. It is very bright and noticeably red. Venus and Jupiter will rise in the East before dawn. Venus is the brightest object in the sky after the Sun and the Moon, and can be seen in the pre-dawn twilight, even if the sky is too bright to see most stars.
You will find that not only are these planets visible, they are very easy to find and markedly different than the stars. Stars appear as points of light that twinkle. Planets are much closer and are reflecting the sun's light back to the Earth, giving them a more solid, disk-like appearance. They tend to be brighter than the stars and also bigger. If you continue to casually observe the planets over the course of weeks and months, their movement becomes obvious as well. My point is, not only are these planets clearly visible to a naked-eye astronomer, they are clearly a different kind of thing from stars.
By Ptolemy's time, the ancient Greeks understood that these planets were special and they even made working mathematical models that predicted their movements. However, the nature of the things which they observed in the sky was a mystery to them. It was something for philosophers to guess at. Many people associated these things with their most important gods. Ptolemy envisioned them as jewels in crystalline spheres. Some even guessed that planets were other earths and that stars were other suns. It wasn't until these planets were studied by telescope in the 1600's that scientists really knew that these things were other worlds like the Earth.
Planets have always been known because they are visible by the naked eye. Planets are often brighter than any other star in the sky, especially in the cases of Jupiter, Mars, and Venus. And because they move about relative to the stars they have always been known to be different and unusual objects. The very name "planet" comes from the greek word for wanderer, denoting the motion of planets through the sky (due to Earth and the planets respective orbital movement). Each planet would also have its own character from this movement: Mercury and Venus, being closer to the Sun than the Earth, are only ever in the morning and evening sky; Mars moves across the sky fairly rapidly and is a notably red color at closest approach; Jupiter is occasionally incredibly bright but moves slower than Mars; and Saturn moves slowest.
Together with the Sun and the Moon the 5 other planets formed the collection of celestial objects separate from the distant "fixed" stars. However, until the advent of the telescope nobody knew what they were or understood why they moved the way they did. Certainly few suspected that they were spherical worlds of matter similar in nature to the Earth. It was not truly until Newton's unified laws of gravity before it became commonplace to understand that the nature of objects and the laws that govern them were the same on Earth as in the heavens, before then they were often seen as separate entities with separate rules and separate natures.