In a large frying pan or skillet fry the bacon until fully cooked. Remove the cooked bacon and half of the bacon fat from the pan, leaving half the fat in the pan.
Chop the onion and garlic and fry in the bacon fat until translucent, about 2 - 3 minutes.
Add the cans of baked beans to the pan, along with the molasses, ketchup, brown sugar and salt. Chop up and add 2/3 of the bacon to pan. Mix until fully combined, then let simmer for 4-5 minutes
Grease a casserole dish then add the beans to dish. Cover the beans with the remaining cooked bacon, then cover the pan with a lid or tin foil. Bake for 25 - 30 minutes. Let the homemade baked beans rest out of the oven for 10 minutes before serving.