Religion long predates the written record, but the earliest named deities and religious officials are found in Egypt and Mesopotamia. I provided some readings for ancient Egyptian religion here and Mesopotamian religion here, and I wrote about private religion in ancient Egypt here.