Don't do anything now; not if your girlfriend is "just now" on the way to the ER with her mom. You would just be "in the way". Her mom might not even be admitted to the hospital.
If she is admitted, then the next day (after she's settled in her room and if she's allowed to have visitors), then pop into her room by yourself for a short visit of a few minutes and say hello. Don't "over-stay" your visit Visiting is tiring - for the visitor and for the patient. Your girlfriend will know that you came to visit her mother.
Don't bring her mom fresh flowers, unless you know that she can have fresh flowers in her room. Often (depending upon the patient's illness), a patient can't have fresh flowers in her room. .If you want to bring her mom a gift, play it safe and bring her a "get-well" balloon from the hospital's gift shop or bring her a book to read.
Don't hang out in the hospital every day and try to keep your girlfriend and her family company while her mother is a patient. .You're not expected to do that, and they don't expect you to do so. If you do (and if, as you say, your girlfriend's parents don't like you), her parents might feel that you're intruding. . .