Religion in antiquity (at least, Graeco-Roman antiquity) was quite different to religion today in that it permeated every part of life. While in modern times we can talk about a dichotomy between 'religion' and 'science', back in ancient times the two experienced a great deal of overlap. Images of the gods and worship of them was everywhere, and since many things that we take for granted today had not been empirically proven (for example evolution, the age of the earth and the universe, etc.) people generally took for granted that the world existed because of some presiding powers over the world (this is a massive oversimplification, but it captures the gist of the situation). Every Greek and house had a hearth dedicated to Hestia, who protected the household, many homes had a Herm outside, both boys and girls would have religious coming of age rites, took part in religious festivals and attending sacrifices, and generally would spend their whole lives surrounded by religion.
With that preface out of the way, there were certainly people with divergent beliefs about religion! The philosophers cited most often in this are the followers of Epicurus, whose ideas are best explained in Lucretius' De rerum natura ('On the Nature of Things', 1st century BC). It's not exactly an 'atheist' work, but comes as close to it as we can reasonably see in antiquity, and Christians later denounced the Epicurean movement and Lucretius as dangerous atheist-types. Despite not actually being atheist, they had some pretty dubious ideas about the gods: for example they didn't attribute anthropomorphic forms to them as regular Graeco-Roman religion did, but instead referred to them as fleeting 'images' (simulacra). More importantly, the Epicureans also believed that the gods didn't care about human life or activity, because they were too busy... well, being gods, and having better things to do:
"For the very nature of divinity must necessarily enjoy immortal life in the deepest peace, far removed and separated from our affairs; for without any pain, without danger, itself mighty by its own resources, needing us not at all, it is neither propitiated with services nor touched by wrath." (book 1.44-49)
Lucretius also claims that we shouldn't fear death because there is no afterlife - something that I don't believe had been said before (though if someone can correct me on that I'd be interested to know). Essentially, the mind and body must be connected for us to experience consciousness, and upon death when the two are separated, we experience nothing, as we did before birth:
"Neither body nor mind has the power to feel without the other’s help, but sensation is created in our bodies by common movements coming from both [...] the nature of the mind cannot work by itself without the body, nor again, deprived of the mind, can the body endure and use the senses [...] If the spirit is immortal, and comes into the body as we are born, why can we not remember also the time that has passed before? [...] Therefore death is nothing to us, it matters not one jot, since the nature of the mind is understood to be mortal." (Segments from book 3)
Thus, with the gods not caring about what humans did and no afterlife to fear, the ultimate goal of Epicureanism was to live a simple and happy life, free of fear. It also teaches us not to mourn the dead, because they are no longer suffering. The entirety of the De rerum natura is available online, if you're interested I'd really recommend reading books 1 and 3 as they deal with this topic in a lot more detail!
There are a few other weird figures who had funky things to say about religion, but this comment has dragged on for a bit too long now and it's 4am here, so I'll leave it at that unless you wish to know more! :)
(Edit: accidentally submitted the comment before it was finished... oops)
Follow-up question: What happened to the Cervaka Sect? How were they regarded by their contemporaries?