1. Nobody can prevent our getting married.
2. Nobody can prevent our marriage.
These are both fine, in terms of grammar; my dictionary gives two examples of this usage, which accord with #1 and #2 respectively:
3. I shall not prevent your going.
4. Should anything occur to prevent his return...
However, both #1 and #2 are quite formal; in everyday usage, it would probably be more usual to say:
5. Nobody can prevent us from getting married.
Or:
6. Nobody can stop us getting married.
(I have to admit, "Nobody can stop our getting married" sounds a little creaky to me; but perhaps other members would disagree.)
MrP