Answer is courtesy of Louis Strous of the National Solar Observatory, Sacramento Peak, NM

For most of human history, almost all people have thought that the Earth was in the center of a giant sphere (or ball, called the "celestial sphere") with the stars stuck to the inside of the sphere. The planets, Sun, and Moon were thought to move between the sphere of stars and the Earth, and to be different from both the Earth and the stars.

Anaxagoras, who lived in Athens, Greece, around 450 BC (about 2450 years ago), thought that the Sun and stars were fiery stones, that the stars were too far away for their heat to be felt, and that the Sun was perhaps more than a few hundred miles in size. With that Anaxagoras was, as far as we know, the first one to suggest that the Sun is a star. His ideas were met with disapproval and he was finally imprisoned for impiety, because his ideas did not fit the prejudices of the time.

Aristarchus of Samos (Samos is a Greek island in the Aegean Sea) lived from about 310 to 230 BC, about 2250 years ago. He measured the size and distance of the Sun and, though his observations were inaccurate, found that the Sun is much larger than the Earth. Aristarchus then suggested that the small Earth orbits around the big Sun rather than the other way around, and he also suspected that stars were nothing but distant suns, but his ideas were rejected and later forgotten, and he, too, was threatened for suggesting such things. Aristarchus and Anaxagoras had no way of actually measuring the sizes of or distances to stars (except the Sun), so they had no proof for their ideas.

Claudius Ptolemaeus (commonly called Ptolemy by speakers of English) of Alexandria (a Greek city in what is now Egypt) around AD 140 (about 1860 years ago) described a geocentric (= earth-centered) model of the universe, with the Earth in the center of the Universe, the Sun as one of the wanderers ("planetes" in Greek) that move relative to the stars, and the stars fixed to the outermost celestial sphere. In this model, the stars and the Sun were completely different. The universe described in this book (which book came to be known as the Almagest) was accepted as the truth by practically everybody for the next 14 centuries, mostly because it was endorsed by the Roman Catholic Church, which became very powerful during that time. This model described fairly accurately how planets move, but not why they moved in just that way, and it lumped the Sun together with the planets rather than with the stars.

Mikolaj Kopernik (known as Nicholas Copernicus outside of his native Poland) lived from 1473 to 1543. In 1543, just before he died, he published a book called "De revolutionibus orbium celestium" in which he proposed a heliocentric (= sun-centered) solar system with the Sun in the center and the Earth merely one of the planets orbiting the Sun, just like the other ones. This model was simpler than Ptolemy's geocentric model, though either one could be used to predict planetary motion. The model of Copernicus set the Sun apart from the planets, but did not say anything about the stars. Copernicus waited as long as possible before publishing this book because he was afraid the Church would not approve of it. At first, most opposition to his ideas actually came from Protestants, not Catholics. Martin Luther, one of the main early figures in protestantism, declared loudly that Copernicus was a fool for "setting the Earth in motion".

Giordano Bruno, an Italian philosopher, lived from 1548 to 1600. He decided that if the Earth is a planet just like the others, then it does not make sense to divide the Universe into a sphere of fixed stars and a solar system. He said that the Sun is a star, that the Universe is infinitely large, and that there are many worlds. He was condemned by both the Roman Catholic and Reformed Churches for this as well as other things and was burnt alive in Rome in 1600 for heresy (claiming something that does not fit the ideas accepted by the Church).

Galileo Galilei, an Italian scientist, lived from 1564 to 1642. In 1610, he was the first person we know of to use the newly invented telescope to look at the stars and planets. He discovered the satellites of Jupiter, which showed that Ptolemy's and the Church's idea that there was only one center of orbits in the Universe (namely, the Earth) was incorrect. Based on his observations, Galilei argued for the heliocentric model of Copernicus. He noticed that stars look like little points even when seen through a telescope, and concluded that stars must be very far away indeed.

In part because Bruno (a convicted heretic) supported them, the ideas of Copernicus were condemned by the Catholic Church in 1616, and Galileo was tried and convicted of heresy in 1633. He was forced to publicly deny the ideas of Copernicus, and was held under house arrest until he died in 1642. In 1979 a reinvestigation of this conviction was started by the Church and finally the conviction was overturned, about 340 years after Galileo's death. A famous story, but perhaps untrue, has Galileo mutter (of the Earth) "And yet she moves!" on his death-bed. Yet, Galileo, like Bruno and Aristarchus before him, had no proof that the Sun and stars are alike.

Johannes Kepler of Germany lived from 1571 to 1630. He studied the positions of planets very carefully and from that determined three Laws of planetary motion that firmly put the Sun in the center of the solar system with the planets orbiting the Sun. It was now clear that the Sun is not a planet, though why these laws of planetary motion should be the way the are was still unclear.

Christiaan Huygens of Holland lived from 1629 to 1695. He determined the distance to the star Sirius, assuming that that star was as bright as the Sun and appeared faint only because of its great distance. He found that the distance to Sirius must be very great. At this time, then, the idea that the Sun is a star was considered seriously by scientists.

Isaac Newton, an English scientist, lived from 1642 to 1727. In 1665 he realized that it was gravity that held the solar system together. Another famous story, probably untrue, has this thought pop into Newton's head when an apple falls on his head while he sits under an apple tree, watching the Moon. Newton then determined the formula that describes how gravity works and showed that this explains the orbits and motion of the planets around the Sun and of moons around planets, and therefore also Kepler's three Laws of planetary motion. The motion of the planets and moons were now explained by a single formula: Newton's Law of Gravity. People speculated that this same law might be valid all through the universe.

Finally, in 1838, Friedrich Bessel for the first time measured the distance to a star without any assumptions about the nature of stars and found it to be enormous. Distances to other stars followed soon, and then people could calculate the true brightnesses of stars, corrected for their distance to us, and discovered them to be about as bright as the Sun. When other things about the Sun were also found to be like those of stars, such as its surface temperature and chemical composition, then the proof was finally here that the Sun is a star.

The Sun is now classified as a G2V star: a main-sequence dwarf star of moderate temperature.

You'll notice that during most of the history described above, people have been persecuted for suggesting things that did not fit the prejudices of the time, even when (or perhaps because) they presented proof that those prejudices were incorrect. Things are better nowadays: you may still be laughed or shouted at for suggesting ideas that are different from current beliefs, but you will no longer be burnt at the stake for them.

Sources/Further reading:

Encyclopaedia Brittannica: articles on "Cosmos" and on the various people mentioned above.

Guinness Book of Astronomical Records: sections on "the Sun" and "history of Astronomy".

The Cambridge Encyclopedia of Astronomy: section on "The history of Astronomy".

Cosmos: by Carl Sagan. This is an execellent video series and book about astronomy, with lots of background stories about the important people in the history of astronomy (especially in Chapter 7: "The Backbone of Night").

In Search of the Big Bang: by John Gribbin. This book is mostly about the history of ideas about the cosmos outside the solar system, which have changed considerably during the course of history: Even 100 years ago people did not know that there were other galaxies outside our own.