I accidentally cut my gums should I be concerned about infection?

Low risk. How did you cut your gums? Fortunately minor traumatic injuries in the mouth generally heal quickly with a low risk of infection. If you have swelling or increasing pain and the area doesn't heal in a few days then see a dentist.
No worries. The cut in your gums will most likely heal on its own, but it’s important to watch for signs of infection. Keep a good oral hygiene and swish warm salt water around in your mouth 3 X per day. If the infection occurs or if it doesn’t seem to be healing, contact your dentist.