The first evidence we have of a hinged door is in Hattusa Picture of the pivot used for the door and some information about Hattusa It is just a socket into which a pivot (log or board of some type) could be placed. This dates to about 1600 B.C.
We have a bronze hinge from Egypt dating to the 8th century B.C. and hinges are mentioned in the old testament for King Solomon's temple dating to at least 600 B.C. These would be the first evidence we have of what we would consider modern hinges.
If something needed to be secured before hinges bolts hasps and other such hardware the easiest method would be to make a vault in the ground and then cover it with a rock large enough that it would be difficult to move. Probably something quarried and cut to fit as the door, think Indiana Jones opening the Egyptian vaults (who would have thought they would get something mostly right in that movie.)
For making homes watertight woven mats or animal skins would be hung over the doors of most homes. This could be tied down or weighted depending on your need.
I don't really have the time to write a lot about this, but since I wrote a PhD thesis on Greek and Roman doors and doorways I feel compelled to contribute.
First of all, "pivots" are not the same as "hinges". The principle upon which they operate is obviously similar, but I would certainly make a distinction between the two. Using the word "hinge" implies that the doors are hung (that is, attached to the jambs). Pivoted doors, on the other hand, rotated in sockets that were cut into the threshold and the lintel. This was by the far the most common method of installing doors in the ancient world. My research only starts in the late Aegean Bronze Age, but I can say for certain that pivoted doors can be found in the Near East much earlier than that. The earliest arrangement that I have seen in person is at Akrotiri, which certainly predates the example from Hattusa discussed elsewhere in this thread (the eruption of Santorini providing a useful terminus ante quem).
Hinge-hung doors likely only began to appear much later, but even by the late first millenium BC these were found more commonly on furniture than in doorways. It is worth noting that folding doors (which were almost certainly had appear by the Classical period in Greece and were definitely being used by the Romans as early as the 3rd c. BC) typically incorporated both the pivot system (upon which the primary leaf rotated) and strap-hinges (which connected a second--and sometimes third--leaf to the primary leaf).
Ugh, I have to get back to work but if you're really interested in this topic send me a PM and I can tell you (a lot) more about it.
Lot's of movies have massive pivoting stone doors. We such things possible/real?