This 「~~って」 is a quotative particle and it is the colloquial form of 「~~という」 in the sentence in question. You will keep encountering those as long as you study Japanese and this is an understatement. In reality, you simply could not speak natural Japanese without using the quotative particle even for a minute, period.
So, who are we quoting? In this case, no one ---- or at least. no one in particular. In my own words, the speaker is merely representing the "general public" by implying "Here is how (most) people, myself included, would think or say." or "Here is what they would say if you asked their opinion."
[知]{し}らない[方]{ほう}がいいって[事]{こと} = things that (people would think/say) are better off if you/they did not know about
~~事もあるんです = there are (also) things that ~~
This ことがある has nothing to do with "to have the experience of ~~". For it to mean that, it needs to be preceded by a verb in the past tense --- as in 行ったことがある,
食べたことがある, etc.
Finally, the difference between 「知らない方がいいって事もあるんです」 and 「知らない方がいい事もあるんです」 is that the former sounds indirect and less assertive, which is exactly what many Japanese people like. The latter sounds more confident by not "quoting the imaginary general public" to back up the speaker's opinion.