"next in order after the third; an ordinal numeral; being one of four equal parts into which a whole is regarded as divided;" mid-15c., alteration (by influence of four), of ferthe, from Old English feorða "fourth," from Proto-Germanic *feurthan (source also of Old Saxon fiortho, Old Norse fiorðe, Dutch vierde, Old High German fiordo, German vierte); see four + -th (1). As a noun from 1590s, both of fractions and in music.
Among the old Quakers, who rejected the pagan weekday names, fourth day was Wednesday, often a secondary day of meeting for worship. Fourth-dimension attested from 1844. The theatrical fourth wall is from 1807. The celebration of the Fourth of July as the epoch of American independence is attested from 1777.
That there is due to Daniel Smith, of the city tavern, for his bill of expences of Congress, on the 4 of July last, including a balance of an old account, the sum of 729 68/90 dollars; also a bill for materials, workmanship, &c furnished for the fire works on the 4 July, the sum of 102 69/90 dollars .... [Auditor General's report, Aug. 8, 1777, Journals of Congress, vol. VII]