Gad was a prophet who received prophecies from the Almighty and communicated them to King David. The first time Gad speaks to King David, Gad tells David to return to Judea from his exile in Moab. The second time, Gad informs David of his mistake in taking a census. David then repents. The third time, Gad tells David to build an altar at the threshing floor that would eventually become the site of the First Temple.