Baby food

Lexus
My daughter is 3 months and on baby food. She just quit gaining weight no matter how many times we switched her formula. She has really bad acid reflux and kept losing weight. Her pediatrician said at this point, go ahead and give her baby food at least once a day. She said that the benefits outweigh the risks right now. I really didn't want to do baby food before 6 months because of open gut but she's 3 months and back down to barely 10 pounds. I feel horrible and that I wasn't doing something right. She's been doing great on baby food the last 3 days. Has anyone else had this happen? Or chosen to feed baby food before 6 months?