Dani Moschella, spokeswoman for the Florida Fish and Wildlife Conservation Commission, said the 7-foot-long gator was considered a "nuisance" since it supposedly doesn't fear humans -- or just sees them as food.
The South Florida Sun-Sentinel reports 43-year-old Stephen Martinez was hired by the city to fish balls from the Lakes of Boynton Beach golf course.
He ventured into darker waters Tuesday when the gator latched onto his air tank and tried to pull him underwater.
Martinez tried to stab the gator with a utility knife, but the gator bit his hand.
Course Manager Dan Hagar said golfers nearby heard Martinez yelling. Martinez was treated for "serious, but certainly not life-threatening" injuries at JFK Medical Center in Atlantis, Fla., said Palm Beach County sheriff's Lt. Rolando Silva.
The gator was apprehended by a trapper.
Officials said the gator could have been protecting a nest, or might just have been startled by Martinez.
It was the 16th alligator attack in Palm Beach County since 1948.