When the ulcer is caused due to an infection and the infection has progressed, it can also cause bleeding from the ulcer and the gums.