Gloucester Harbor and its surrounding area makes a solid day trip from Boston Harbor. I did this trip with my family on a Saturday last summer. Depending on your speed, Gloucester is usually a little over an hour voyage from the outer Boston Harbor. The distance from Boston Harbor (as of the beginning of the North Channel at Deer Island Light) to Gloucester is approximately 19 Nautical Miles.
Once there, things to do for those arriving by boat include tying up and exploring the historical downtown, throwing anchor behind the Dogbar (the large breakwater protecting the Harbor) for a picnic and making a trip a further 2-3 miles north up to the twin lighthouses on the legendary Thatcher Island off the neighboring town of Rockport. Here is a video of Thatcher Island which I bet will make you want to go!
A view of the Gloucester Harbor Light from the end of the breakwater:
On clear nights, this light can be seen as far south as the cliffs off Jerusalem Road in Cohasset.
There are several points of caution to keep in mind as you make this trek. Refer to a chart so that as you leave the end of the North Channel out of Boston, you stay far enough from shore to avoid the many obstructions North of Marblehead and Salem, such and Tinkers Island and the surrounding rocks. With that being said, you also need to be mindful of the restricted area offshore where the ship terminals are located. However, this is quite far offshore and well marked. The only other thing to keep in mind is that on a pleasant summer day with a typical SW wind, you will be heading right into the wind and chop as you go back toward Boston. If you are not up for the entire haul up to Gloucester, Marblehead Harbor is quite nice, but I find the places to tie up are limited.
Source: NOAA. As with all chart clips, these are not an official chart intended for navigation, and users should read the disclaimer.