The most common causes of gastritis are H. pylori infection and prolonged use of NSAIDs.