What is the story behind the phrase 'as it were'? Where did it come from?
Solution 1:
The form were is a past subjunctive, and it is used in a construction that is common in hypothetical situations:
He would kill me if he were able.
She behaves as [would be fitting / etc.] if she were upper class.
The phrase is theoretically short for as [it would be if] it were [so], though it is uncertain whether that is really where it came from.
The Oxford English Dictionary (2nd ed.) has its earliest quote from circa 1386:
As it were: as if it were so, if one might so put it, in some sort: a parenthetic phrase used to indicate that a word or statement is perhaps not formally exact though practically right.
c1386 Chaucer Nun's Pr. T. 26 She was as it were a maner deye.
1399 Langl. P. Pl. C. ix. 22 Ich wolde a-saye som tyme for solas, as hit were.
1531 Elyot Gov. (1834) 211 It draweth a man as it were by violence.
1579 E. K. in Spenser's Sheph. Cal. Mar. 11 Gloss., The messenger, and as it were, the forerunner of springe.
1692 E. Walker Epictetus' Mor. (1737) xxii, You're as it were the Actor of a Play.
1711 Steele Spect. No. 32 31 She has thought fit, as it were, to mock herself.
1881 Buchanan God & Man I. 124 She took him at once, as it were, into her confidence.
Solution 2:
Webster's 3rd New Int'l Dictionary gives its meaning as:
as it were: as if it were so : in a manner of speaking <her triumph, as it were, did not last long>
The Oxford English Dictionary dates its first written usage by Chaucer c. 1386.
Solution 3:
According to the Oxford English Dictionary, it's quite an ancient phrase that emerged from an archaic form of the subjunctive mood:
a. Introducing a supposition, expressed by the subjunctive mood: As if, as though. arch.
1135 Anglo-Saxon Chron., Uuard þe sunne suilc als it uuare thre niht ald mone.
As the definition above suggests, a rough modern English equivalent to this original use might be 'as if,' as in 'he reeled as if hit by a sledgehammer.'
The OED dates its current sense to c1400:
c1400 (1387) Langland Piers Plowman (Huntington HM 137) C. ix. l. 22 Ich wolde a-saye som tyme for solas, as hit were.
c1405 (1390) Chaucer Nun's Priest's Tale (Hengwrt) (2003) l. 26 She was as it were a maner deye.
1531 T. Elyot Bk. named Gouernour iii. xi. sig. ci, It draweth a man as it were by violence.
These uses are clearly different from the original, and closer to the modern use, but it's not hard to imagine a plausible narrative to explain how they might have arisen from the original.