If you are invited to a graduation ceremony or party, you should bring or send a gift to the graduate. It is most appropriate to give the gift on the day of the graduation or party or shortly before or after.
If you cannot attend either event, a floral or balloon arrangement, or greeting card sent to the graduate lets them know you are thinking of them.
A graduation announcement is not the same as an invitation and does not require a gift.