If baby isn't gaining enough weight, you may need to do some adjusting in terms of baby's latch or your milk supply. Your best defense is to get hands-on help from a certified lactation consultant (IBCLC) ASAP. She’ll be able to help you determine if baby needs a deeper latch and show you how to achieve this. If baby's latch is too shallow, he might not be able get enough milk. This in turn can lower your milk supply. (Your body makes milk to match the amount baby drinks.) To boost your supply, feed baby every two to three hours, pump your breasts with a hospital-grade or professional-grade electric pump for a few minutes after feedings for a few days (this will help even if no milk comes out), and get as much rest as you can manage.
Some babies can also have trouble sucking effectively due to different factors, like muscle weakness, respiratory problems or a tongue-tie. A doctor or lactation consultant should be able to evaluate baby's suck and help you find a solution. (For example, a tongue-tie can be immediately clipped, and baby can go back on the breast right away.) If your doctor isn't interested in helping you achieve your breastfeeding goals, consider finding another doctor.