Difference between たことがある and ることがある
Only た and る differ, but the meanings are completely different: たことがある is an experience (have done …), and ることがある is something that happens now and then (sometimes …).
Look at the adverb that goes with it: 一度, 前に, 子どものころ → experience; ときどき, たまに → now and then.