1570s, from Latin atrium "central court or first main room of an ancient Roman house, room which contains the hearth," from Proto-Italic *atro-, sometimes said (on authority of Varro, "De Lingua Latina") to be Etruscan. Watkins suggests it is from PIE root *ater- "fire," on notion of "place where smoke from the hearth escapes" (through a hole in the roof). De Vaan finds this not very compelling, "since soot is black, but not the fire itself," and prefers a different PIE root, *hert-r- "fireplace," with cognates in Old Irish aith, Welsh odyn "furnace, oven," Avestan atarš "fire."
The appurtenance of atrium depends on the interpretation that this room originally contained the fireplace. This etymology was already current in ancient times, but there is no independent evidence for it. Still, there is no good alternative. [de Vaan]
The anatomical sense of "either of the upper cavities of the heart" first recorded 1870. Meaning "sky-lit central court in a public building" is attested by 1967.