People have been experimenting with growing plants in controlled environments as of Roman times. Obviously these methods were very different from the modern greenhouse we know now, but the idea was already active in the mind of some enthusiastic Roman gardeners.
In the 17th century the concept of greenhouses started to appear more and more in England and the Netherlands. The 17th century greenhouses were still far from practical, the amount of work to close up at night or during winter was enormous.
The modern greenhouse as we know it, is often credited to the French botanist Charles Lucien Bonaparte. He built the first practical modern greenhouse in Leiden, The Netherlands, during the 1800s to grow medicinal, tropical plants.
The golden years of the greenhouses were in England during the Victorian era, where enormous glasshouses were constructed and the upper class built the most exquisite glass constructions.