As Earl said, that is underfill. It's used to solidly hold delicate IC's to the circuit board and prevent water from getting underneath. It's not perfect but a very good solution for manufacturers. It's a pain to work on though for repairers.
The connector on the upper left appears to be damaged. Do you have continuity between the pins on the inside of the connector and the pcb pad upon which those pins are soldered. Sometimes the corrosion eats away at the solder joint. Otherwise, water damage can be very insidious, eating away underneath IC's.
You only show one side of the board. What does the other side look like?
Water damage is the hardest thing to troubleshoot because you don't know where all the damage is. What you see can sometimes be the tip of the iceberg. Focus on the connector for now. If you have a very fine point soldering iron and some experience, you could try and touch up those connections if needed. Only if needed...you can do more damage than good if you slip even only a few millimetres.
Otherwise, I suggest you find a repair shop that specializes in water damage and micro-soldering. The phone is not too old so you need to determine if a repair is worthwhile. Certainly if you need to recover data.