No, Bayport is not in the Town of Brookhaven. It is a hamlet and census-designated place (CDP) located in the Town of Islip, within Suffolk County, New York.
Bayport sits on the Great South Bay, bordered by Sayville to the west and Blue Point to the east. The Town of Brookhaven lies immediately to the east of Islip, so Bayport is close to the Brookhaven border but firmly within Islip.
Suffolk County's towns (Islip, Brookhaven, Babylon, Huntington, Smithtown) are large and often confused. Always verify with the Town of Islip official website or Suffolk County GIS for precise boundaries.