It is Mary's birthday. I've bought a present for her.
We say: It is a present for Mary.
Is it also correct to say: It is Mary's present? Do they have the same meaning?
That is Mary's X.
is the possessive form, and it means that X is associated with Mary somehow.
That is Mary's car.
usually means we are talking about the car that Mary owns, but, in the context of, say, a soapbox derby, it could mean, "that's the car that Mary built," or, if we were a large group of coworkers at a rental car agency, it could mean, "that's the car that Mary will be driving." If we were at an art exhibit, it could mean, "that's a picture of a car that Mary painted," and if Mary is a Formula-1 race car driver, it could mean, "that's Mary's car that just crashed," particularly if we end it with an exclamation point, like this:
That was Mary's car!
It the case of giving gifts, you've correctly supplied one possible meaning:
It's the present I intend to give to Mary.
Although FumbleFingers correctly pointed out there are other possible interpretations that are also valid:
That's the present I received from Mary.