The earliest view of the universe was as a finite, enclosed space, like a large building, with a flat Earth at the base and stars on the roof. This primitive view persisted among most people throughout the middle ages, despite more accurate ideas being known to geographers and astronomers. Indeed the flat Earth is still found to be a good enough approximation for most Earth-bound activities, such as surveying or gunnery.
The idea of the Earth as a spherical body was known to the ancient Greeks. Empedocles famously made an estimate of its circumference. However the daily rotation of the Earth seems not to have been postulated to explain the motion of the stars, instead the generally accepted view, among educated people, was that the stars were attached to a celestial sphere that rotated about the Earth. The Sun, Moon and Planets moving in the intervening space. This system was developed mathematically by Claudius Ptolemy in his work on astronomy, the Almagest, in which the motions of the planets were simulated by combinations of circular motions.
The geometry of Euclid, which was set in an abstract space of infinite lines and planes, made it possible to think of space extending beyond these bounds. In medieval times this provided a home, beyond the celestial sphere, for a heaven with a god and many circles of angels.
The problem with accepting the daily rotation of the Earth was that it raised obvious problems that could not be answered by the known ideas of mechanics. Why was the motion not felt? How was the motion maintained? What prevented anything falling off? A few philosophers conjectured answers but none gave proofs.
Problems with the Ptolemaic system led to the publication in 1543 of the De Revolutionibus of Copernicus, which set the Earth in motion around the Sun, treating it as a planet. This expanded the universe considerably, since despite the annual motion of the Earth no consequent parallax motion of the stars could be detected, which meant they were at a great distance. Some thinkers, like Giordano Bruno began to think of the universe as infinite, and filled with an infinite number of solar systems and life-forms.
Tycho Brahe made instruments for more accurate observation of the planets. Johannes Kepler used these results to deduce three laws of planetary motion, finally getting rid of the obsession with circles. Galileo Galilei turned a telescope on the skies for the first time and observed moons orbiting Jupiter, as the planets orbit the Sun. He also thought hard about the laws of mechanics needed to answer the problems associated with a moving earth.
All this work was tied together in the Mathematical Principles of Natural Philosophy published by Isaac Newton in 1687, in which he was able to deduce Kepler's laws from general principles of mechanics and gravitation, which he applied in Euclid's infinite space. This was the predominant picture of the universe for the next 250 years.
Mathematicians Bolyai and Lobachevski developed non-euclidean geometries around 1820, which were generalised by Riemann around 1850. This provided the back-ground for the expression of the space-time ideas of Albert Einstein in 1916, in which the universe was conceived of as non-euclidean, with mass and gravitation being related to the curvature of space-time. Einstein's equations showed that a stationary model of the universe would be unstable, since it would be liable to contract or expand.
Meanwhile the astronomers, with ever stronger telescopes, were expanding the universe even more, showing that many of the 'nebulae' previously observed were not clouds of gas but 'galaxies' of stars at great distances. Then in 1929 Edwin Hubble observed that the light from these galaxies was red-shifted which indicated that they were receding from us, and from each other, so that the whole universe was in fact expanding.
If the universe was expanding that meant that in the past it was smaller than at present. The current view is that it is possible to trace the history of the universe back 13.7 thousand million years to a state called the 'big bang'.
One of the main evidences for this is the 'cosmic background radiation' observed by Penzias and Wilson in 1964, and recently mapped from space.