I was checking the gravity on my fermenting beer and took the top off my bucket to do so. When reattaching the airlock, the black rubber gasket on the bucket fell in. I tried to fish it out with a sanitized spoon but was unsuccessful. Will this affect my beer in the end? I'm about half a week in to a 2-week fermentation and the active fermentation is done and that's why I was checking the gravity. It's actually at the final gravity the kit says it should be at. How should I get the airlock to stay in place for the remaining week and a half?
Welcome to the club! Almost every brewer I know has dropped something in the fermenter at some point. I say leave it there. It will cause no off flavors (if the rubber wasn't inert it wouldn't have been used on the fermenter). At this point you're more likely to cause problems by trying to remove it than if you just left it where it is.
Assuming you have a glass carboy for secondary, I recommend going to secondary right now. Since the primary fermentation is done and it's reached it's final gravity, there is no harm in starting secondary early, and you need to have some sort of airlock to prevent infection. Siphon into the carboy and you should be able to dig around through the yeast and gunk to find the gasket (it'll probably be messy). But I wouldn't recommend trying to fish out the gasket because it has probably sunk to the bottom, but you can't just leave it in there since you need to secure an airlock. Let me know if this bucket is your only container and i'll try to think of other options.
You probably haven't spoiled your beer, but it sounds like you're not out of the woods yet. It might have a minimal effect on your beer, and if you already put the lid back on, you're probably fine.
First, if you sanitized your bucket properly, then the inside of the lid was all sanitized as well, and I would assume that would take care of the gasket. If the design of your bucket causes surfaces of the gasket to be on the outside of the bucket, then you're at a higher risk of having infected your beer.
Second, since the fermentation was finished, the beer is a fairly hostile environment for bugs. The higher the alcohol content and IBUs, the tougher it is for uglies to grow.
The beer could, however, pick up rubbery or chemical-like flavors from the gasket and anything that was on the gasket. Again, don't fret; it's probably fine. But you should definitely consider cleaning and sanitizing a proper tool for fishing out the gasket.
As I mentioned, hopefully you realized that you needed to keep a lid on the beer, whether you have a gasket or not. Leaving your beer exposed to air for any significant length of time drastically increases the odds of ruining the beer. If you immediately covered it, then it's most likely fine. The gasket shouldn't really be critical - as long as air can't flow over your beer, it'll be reasonably safe over a time period of only a week or two. (Because let's be honest, given the number of ways you've already potentially ruined your beer, this is the least of your concerns.)
In the end, if you were careful throughout the entire situation, you probably have nothing to worry about. If you did happen to get unlucky, you should be able to tell by bottling (or kegging) time, so be sure to sample a bit to make sure it's not infected before proceeding. In the meantime, RDWHAHB.