I have never been to ancient Greece, because I am not capable of time travel...but I've written about ancient Greece. With enough research, authors have the ability to write about pretty much anything -- any environment, any setting, any action. But if you want your book to feel real and resonate with readers, use your experience. Personal experience can be translated to any character in any setting...if you know how.
In My Shoes
A strong literary character is only strong because of what happens to them in the book. Suffering loss, getting married, being heartbroken, going hungry -- these things make a book interesting and can shape a character throughout its pages. If you haven't experienced these things, you can still write about them. But if you choose to write about things that have happened to you instead, your book is going to be much richer.