You must get immediate medical attention if you have a urinary tract infection while you're pregnant. Failure to treat a UTI during pregnancy could lead to early delivery or even spontaneous abortion. Also, certain antibiotics can harm your fetus, so do not self-start antibiotics that you may have kept in your home from previous infections.