Mariner 4 was the first spacecraft to return photographs of Mars from near the planet, making its flyby of Mars in 1964. Those photographs showed what appeared to be a barren, desert surface. Mariner 4 also discovered that Mars had no magnetic field protecting it from ionizing solar radiation.
I've read many places that until Mariner 4, Mars was often assumed to host life of some kind, causing the seasonal color changes on the planet. Wikipedia's article on Mars sums it up well:
The seasonal changes (consisting of the diminishing of the polar caps and the dark areas formed during Martian summer) in combination with the canals lead to speculation about life on Mars, and it was a long-held belief that Mars contained vast seas and vegetation.
Was the general view of the scientific community at the time that Mars had life? Or did scientists generally believe Mars to be a lifeless place?
A few statements about life on Mars before Mariner 4:
NASA's Summer Study, a group of eminent scientists gathered at Stanford University, said this in 1964:
Given all the evidence presently available, we believe is entirely reasonable that Mars is inhabited with living organisms and that life independently originated there.
From Life magazine, 1944:
The photographs of Mars...present evidence that points to the existence of life on Mars. ... Given this environment, it is logical to conclude that the vast regions on Mars that change from green to brown in seasonal cycles are covered by vegetation.
From a letter published in New Scientist, 1959 by a Cambridge professor:
At present there seems to be rather convincing evidence for life on Mars, and it is this that lends support to the assumption that life will come into existence where conditions are suitable.
A biologist said this in Popular Science, 1962:
We've said already that the color change fits neatly into a spring-summer vegetation cycle. A second point in favor of life is that when the yellow clouds do cover the planet they don't permanently tinge the markings yellow. Within a couple of weeks, whatever is there shakes it off or grows up through the cover.
I've been able to find plenty of citations that argue for life on Mars, and plenty that argue against. What I haven't been able to get is any clear picture of the dominant scientific consensus of the time.