In the flashback Iris got shocked by Barry while he was comatose. She got the same type of shock from the Flash. That it was the static that helped her figure it out is a little iffy, but it's a comic book show so I can let that slide.
It makes sense if no other people gave her that type of shock before