Sometimes gums start bleeding when they are swollen. Please don't stop brushing because of this but make sure that you are brushing in the right way. Diet changes I would suggest you to take fibrous vegetables like carrot and avoid sugar.
There are many reasons for gum bleeding. Bleeding in gums could be due to deposits/calculus around gum line. These deposits have bacteria which releases toxins because of which your gums bleed. You should get cleaning done for the same.
Also bleeding could be due to using hard bristles toothbrush so change your toothbrush after every 1.5 month and use a soft-medium bristle brush.
Regarding your concern about diet plan, you should just avoid things which are too sticky and gets deposited around your gums for example something like parle biscuits, chips, things made out from maida flour.
Try rinsing your mouth after every meal.
I hope this helps.