How do you deal with code that needs to be refactored?

I'm working on a code base that is getting large, and areas of it have been rushed (favoring speed of getting it done vs. quality code).

Any tips on balancing getting stuff done in a timely manner vs. spending the time to re-factor?