The two original gods were Selûne and Shar. After they turned on each other during the Dawn War, they both created multiple deities that took on part of their power. Some of these gods have died since then, others have created other divine beings of their own. The most powerful have even created full gods.
There are three things that makes a god what they are. They gain power from other beings adhering to their principles. They can spread their influence, allowing their clerics to access the power. And third, they can guide souls that have followed their principles, leading them towards the god after their death.