From the Online Etymology Dictionary:
theory
1592, "conception, mental scheme," from L.L.
theoria (Jerome), from Gk.
theoria "contemplation, speculation, a looking at, things looked at," from
theorein "to consider, speculate, look at," from
theoros "spectator," from
thea "a view" +
horan "to see." Sense of "principles or methods of a science or art (rather than its practice)" is first recorded 1613. That of "an explanation based on observation and reasoning" is from 1638. The verb theorize is recorded from 1638.
This seems to confirm your second acount, that of observation without referring to a god.
On the other hand, also from the OED:
theosophy
1642 (implied in theosophical), "knowledge about God and nature obtained through mystical study," from M.L.
theosophia (c.880), from Late Gk.
theosophia (c.500, Pseudo-Dionysus) "wisdom concerning God or things divine," from Gk.
theosophos "one wise about God," from
theos "god" (see
Thea) +
sophos "wise, learned." Taken as the name of a modern philosophical system (sometimes called Esoteric Buddhism), founded in New York 1875 as "Theosophical Society" by Madame Blavatsky and others, which combines teachings of Hinduism and Buddhism.
And finally:
Thea
fem. proper name, from Gk.
thea "goddess," fem. equivalent of
theos "god," from PIE base
*dhes-, root of words applied to various religious concepts, e.g. L.
feriae "holidays,"
festus "festive,"
fanum "temple."
This seems to lead us in a circle! What's the relationship between
thea meaning view and
thea meaning goddess?
Looking at a Greek dictionary at the Perseus Project it appears that there at two different words spelled the same:
thea from the feminine of
theos meaning "goddess" and
thea from the verb
theaomai meaning "to look on, gaze at, view, behold."
Indeed, my trusty online translation page, Systranet, translates ΘΕΟΣ (THEOS) and ΘΕΑ (THEA) as GOD and VIEW, respectively.
(Note: I have never studied Greek (other than the Greek Alphabet for physics and chemistry), only Latin and French, so there may be more to this. I've found that etymology is like peeling an onion: there are sometimes many layers that can make you cry.
)