The earliest Google Books match I could find for "[women] of a certain age" is from The Spectator, number 53 (May 1, 1711), and it takes the expression in an unexpected direction:
Epictetus, that plain honest philosopher, as little as he had of gallantry, appears to have understood them [women], as well as the polite St. Evremont, and has hit this point very luckily. "When young women," says he, "arrive at a certain age, they hear themselves called Mistresses, and are made to believe, that their only business is to please the men : they immediately begin to dress, and place all their hopes in the adorning of their persons ; it is therefore," continues he, "worth the while to endeavour by all means to make them sensible, that the honour paid to them is only upon account of their conducting themselves with virtue, modesty, and discretion."
A similar sense appears in Letters from Henrietta to Morvina: Interspersed with Anecdotes, Historical and Amusing, of the Different Courts and Countries Through Which She Passed (1777):
She [an "amiable friend"] is one of two daughters of a prince of one of the first houses (next to those of the blood) in France : indeed some of the purest of that blood runs in her veins, and she does honour to the best blood in Europe. At a certain age, she, like all other women of condition, was placed in a convent for education. From a sweetness of disposition, as well as strength and quickness of parts, soon became the darling of the whole sisterhood, and she held them equally dear.
In both of these instances, the "certain age" is scarcely beyond childhood. Francis Hutcheson, A Short Introduction to Moral Philosophy, in Three Books: Containing the Elements of Ethicks and the Law of Nature (1753) may have a similar starting point in mind when he asserts that the desire to have children is peculiar to persons of "a certain age," though it isn't clear whether he specifically has in mind a desire for parenthood or simply sexual desire:
The appetites toward the preservation of the body are excited in every stage of life by the uneasy sensations of hunger, thirst, and cold. The desire of offspring at a certain age, and parental affection is also universal ; and in consequence of them the like affections toward kinsmen.
George Berkeley, "Farther Thoughts on Tar-Water," in A Miscellany Containing Several Tracts on Various Subjects (1752) seems to apply the phrase to women after menopause:
There is a certain Age or Time of Life, when the female Sex runs no small Risk from the ceasing of their natural Evacuations. In this Case Tar-Water is a good Preservative, purifying the Blood, and clearing it from that cancerous Tendency, which it is sometimes subject to, about that time. I take it to be a Specific in all cancerous Cases, even the bleeding Cancer, esteemed incurable by Physicians, hath been cured by Tar-Water.
The expression "[person] of a certain age" likewise dates to the early 1700s, but the certain age is not consistent from one instance to the next. For example, from "Letter 38, On the Scotch Laws Relative to Marriage" (May 10, 1775), in Anonymous, Letters From Edinburgh, Written in the Years 1774 and 1775, volume 2:
You will imagine, I suppose, from hence [an instance where the presumption of marriage from cohabitation, under Scottish law, led to a finding that two people who conceived a child together without cohabiting were legally married], that here is nobody of a certain age unmarried. But, as I have already told you, though many attempts are made to infer such kind of nuptials, they are constantly almost discouraged by the Judges.
The first Google Books instance where "a certain age" emphasizes that the woman thus described is no longer in the first blush of her youth appears in "The Several Classes of Ladies," in The London Magazine (December 1754), reprinted from the November 28 issue of The Connoisseur:
At the house of an acquaintance where I lately visited, I was told, that we were to expect Mrs. Jackson and the two Miss Wrinkles. But what was my surprise! when I saw on their arrival a blooming female of 25 escorted under the first denomination, and the two nymphs, as I expected, come tottering into the room, the youngest of them to all appearance on the verge of 60. I could not help wishing on this occasion, that some middle term was invented between Miss and Mrs. to be adopted, at a certain age, by all females not inclined to matrimony. For surely nothing can be more ridiculous, than to hear a grey-haired lady past her grand climackterick mentioned in terms, that convey the very idea of youth and beauty, or, perhaps, of a bib and hanging-sleeves.
This is the example that William Safire cites in his article that Josh61 mentions in a comment above. An even clearer example of the same usage appears in Joseph Palmer, A Fortnight's Ramble to the Lakes in Westmoreland, Lancashire, and Cumberland (1792):
Set off in the Leeds mail coach with a fair wind and a scowling sky ; our company consisted of my friend, a Sheffield manufacturer, a maiden lady of a certain age with a large band box, big enough to have purloined a Jemmy Jumps, but which we will suppose was better furnished with head ornaments to surprise a country village.
The crucial specific of both this example and the previous one is that the woman of "a certain age" is unmarried—and no longer deemed (by critical observing males) to be prime marrying material. Today, "a woman of a certain age" seems to retain much the same meaning as in these two instances, except that the woman's being unmarried has become far less significant as a qualifying criterion than her being past the first bloom of youth.