I'm not medically trained but my son has congenital heart disease and so I guess we turned into expert patients along the way! Go find another doctor, not gaining weight is a really common symptom, the heart is working so hard just to keep the main organs working she doesn't have the energy to feed anymore, it's like doing aerobics all the time. My advice would be to be persistant with the doctors, at birth I was told me son was fine, had a heart murmur but that is common in newborns, I kept insisting something was wrong, they sent us home. At 11 days i went to A&E with him and was told that because I had a horrid pregnancy I would not accept he was well. I knew they were wrong and stood in the hospital shouting like a mad woman telling them they had to listen and he was ill, they called child services to take my baby from me but the head pediatrician was called in and because my son's feet were a bit puffy he sent for a chest x-ray just to be sure. After x-ray we were rushed to a crash room because he was in heart failure and after a round of apologies they said he wouldn't survive the night. Luckily he did, he's had a few surgeries but he just turned 5 years old and is doing really well but I hate to think what would have happened if i hadn't stood my ground. Medicine is an art and not a science, sometimes they are wrong, get another doctor to check your daughter and make it clear to them she is struggling. best of luck :)
The first thing, I would do is get a second opinion. Make an appointment with another specialist(pediatric cardiologist) to look at your daughter. With ASD oxygen rich blood gets pumped back into the lungs where it has already been instead of going to the rest of the body, which can cause her bluish/purple tinged lips, as her body isn't getting the oxygen it needs. It does seem like her heart. You don't have to take what one doctor has said, go to someone else who will listen and look into the possibilities. Good luck!