The struggle for existence is a natural history [metaphor]. It refers to the competition between living things to survive. This, and the similar phrase struggle for life, were used over 40 times by Charles Darwin in the Origin of Species, and the phrase is the title of chapter 3 of the Origin.
Darwin got the idea from his reading of the 6th edition of Thomas Malthus' Essay on the principle of population, and Alfred Russel Wallace also used the phrase regularly.

The idea is actually much older, and many natural historians have noted the competition between animals. Generally speaking, they have been interested in the competition between species. Malthus was probably the first to think about the struggle for resources between members of one species – humans.

Darwin first heard about Malthus in letters from his sister Fanny, while he was voyaging on HMS Beagle. Fanny told him Malthus' ideas were being promoted by Harriet Martineau, an early feminist writer.p153 Later on, back in London, Darwin met Martineau over dinner, and put a lot of thought into the ideas of Malthus. The number of humans could double in 25 years. If they did not, it was because of competition for resources, such as food, or because wars and disease became more common.

Darwin began to realize that every species of living thing has the potential to increase geometrically (2, 4, 8, 16, 32, 64, 128, 256, 512, ....), yet this pattern of population growth does not happen in practice. Darwin explains why organisms do not increase geometrically. His reasons were the competition between animals, the limited amount of food, the climate, and epidemics. All organisms are bound together in the struggle for existence by complex relationships between each other. Also, the struggle for existence is greatest between organisms of the same species.

Later, he combined these ideas with two more. One was the idea that, in the struggle, some would be better suited than others to succeed.p264–268 The other idea was heredity: that the characteristics must be at least partly inherited. This led to his idea of evolution by means of natural selection. Wallace independently came to the same conclusion.

Darwin used the phrase 'struggle for existence' as the title of the third chapter of his Origin of Species in 1859. The old idea was now fitted into a complete theory.
"I should premise that I use the term Struggle for Existence in a large and metaphorical sense, including dependence of one being on another, and including (which is more important) not only the life of the individual, but success in leaving progeny ... a plant on the edge of a desert is said to struggle for life against the drought, though more properly it should be said to be dependent on the moisture". (p62 of the first edition)
"A struggle for existence inevitably follows from the high rate at which organic beings tend to increase". (p63)

Darwin says: "I first thought of selection owing to struggle July 15th 1838".
By the 1850s he had it all worked out in his manuscript "big book" (which was not published until 1975).

While recovering from malaria in the East Indies, Wallace sent an essay to Darwin in 1858. It contained the phrase: "The life of wild animals is a struggle for existence". Wallace had not known much about Darwin's ideas, and reached the idea from exactly the same source: one of the later editions of Malthus' Essay on population. The arrival of this essay led to the joint publication of the idea of evolution by natural selection in 1958.

Related pages 
Social darwinism
Competition (biology)
Natural selection

References 

Metaphors referring to nature
Evolutionary biology

en:On the Origin of Species#Struggle for existence, natural selection, and divergence