On twitter a couple of days ago I came across this item by Bettany Hughes:
Palladas of Alexandria c.350AD ‘in the darkness of night Zeus stood beside me and said: “Even I, a god, have learned to live with the times”. @Bettany_Hughes
I confess that Palladas is not a name that I had ever heard of. But he is a pagan epigrammist, whose work is preserved in the Greek Anthology, of the 5th century – or so the introduction to the Loeb edition states.
From a selection from this available online at Gutenberg I learn the following:
Palladas of Alexandria is the author of one hundred and fifty-one epigrams (besides twenty-three more doubtful) in the Anthology. His somber and melancholy figure is one of the last of the purely pagan world in its losing battle against Christianity. One of the epigrams attributed to him on the authority of Planudes is an eulogy on the celebrated Hypatia, daughter of Theon of Alexandria, whose tragic death took place A.D. 415 in the reign of Theodosius the Second. Another was, according to a scholium in the Palatine MS., written in the reign of Valentinian and Valens, joint-emperors, 364-375 A.D.
Thankfully the Greek Anthology is accessible online in the Loeb edition in five volumes. Better yet, since it is on Archive.org, it is possible to search through the OCR’d text for his name.
This I have done, and have found what seems to be the real version of the quotation, in volume 3, on p.247, no. 441:
441.— PALLADAS OF ALEXANDRIA
On a Statue of Heracles.
I marvelled, seeing at the cross-roads Jove’s brazen son, once constantly invoked, now cast aside, and in wrath I said : “Averter of woes, offspring of three nights, thou, who never didst suffer defeat, art to-day laid low.” But at night the god stood by my bed smiling, and said : “Even though I am a god I have learnt to serve the times.”
 The statue had doubtless been cast down by the Christians.
I must confess that my search through the Greek Anthology moves me, rather, to read it! I hesitate, however, to add five volumes to my straightened shelves.