According the Act of Settlement of 1701, a member of the royal family must remove themselves from the line of succession before they can marry a Catholic. This dates back to the age when Protestants and Catholics were still warring against each other in England, and the Protestants wanted to make sure they could stamp out any chance of Catholic ruler after King James II was overthrown in 1688 during the so-called Glorious Revolution. In recent years, this has resulted in two members of the royal family removing themselves from the line of succession — Prince Michael of Kent in 1978 and George Windsor, Earl of St. Andrews, in 1988. However, both of those royal men were fairly far down the succession list, so they probably felt there was no harm in removing themselves in order to marry the women that they love. Harry is probably not going to ever become king, but he is currently fourth in the line of succession, which is still considered to be fairly high up on the list. Realistically, Harry probably would not cause more royal drama in order to marry a Catholic at this point in time. Other religions are apparently free game, but Harry would probably only ever get serious with an Anglican.
The queen has pushed to abolish the anti-Catholic rule on royal marriages with 2013's Succession of the Crown Act. This would allow members of the royal family to marry Catholics and still remain on the line of succession. Considering that the threat of a Catholic rule isn't really on the top of anyone's minds these days, it's probably a good idea to cut out the discriminatory rule. However, the law has not yet gone into effect, meaning that Catholics are still out for the time being.