In simple words, GitHub is the entire site, whereas, gists are nothing but some special services offered by GitHub.
GitHub is a platform where sharing files, information, or even the entire project are made easy. There are options where we can share files among a team privately or make things public to the whole world.
But on the other hand, the gist is a simple way to share code snippets. It is used when we need to share a sample piece of code or technique with our co-workers or friends.