I grew up in Boston, lived there for 35 years and I love the city.
The touristy areas are safe, just like any city there is crime but for the most part it is fine.
I highly recommend Faneuil Hall area, Freedom Trail and just hanging at the Common or Public Garden. Take a walk on the Esplanade and if you are lucky might be a night with a free concert.
Ptown is a gay friendly area, and like one the sign that says #1 answer to #1 question - No, there are no straight bars in town

It is however a great place.
I would not dismiss the North Shore of MA either - Gloucester, Marblehead & Salem among others are great historical places. They also have some nice beaches and wharf areas.
Feel free to PM me. I live about 15 min off Cape, work in Southie and the BF lives in Salem so I am all over our fun state!!
Oh and if you are abaseball fan, they have tours of Fenway Park, a must see. The oldest BB park in the US.