For things like canker sores I apply salt directly on them. Others have mentioned gargling with salt water. Personally I don't like the taste so I just put salt directly on. It stings for a couple seconds but goes away fast and I've noticed that it helps them heal faster this way then if I just left them alone. Here are some other possible treatments which may also work with sore gums: http://www.mayoclinic.com/health/canker-sore/DS00354/DSECTION=treatments-and-drugs
Finding the cause and treating that is really your best bet so you don't have to deal with them as often if anymore.