Whether Barack Obama was taking a rouge-colored swipe at Sarah Palin is debatable, but a staffer’s claim that "lipstick on a pig" is a phrase “older than my grandfather’s grandfather” should raise eyebrows, Ben Zimmer explains on Slate. The phrase has probably only been around since the 1980s (about a century less than lipstick itself), but the general sentiment is quite a bit older.
There are many older variations, with the classic “You can't make a silk purse from a sow's ear” dating to the 16th century. "A hog in armour is still but a hog" was recorded in 1732; "A hog in a silk waistcoat is still a hog," in 1887. The version Obama used didn’t appear until 1985. The saying was popularized by former Texas Gov. Ann Richards, and was even used recently by John McCain when he attacked Hillary Clinton’s health care plan. But, Zimmer says, “it's not quite the vintage of anyone's grandfather's grandfather.” (More Sarah Palin stories.)