Energy gap of topological surface states in proximity to a magnetic insulator