To successfully overcome enemy fire you need to time your button presses carefully. Note that if you time your move right then you can get temporary invulnerability as well.