I assuming the trim system works and just the gauge is faulty, check all wires, connections and fuses. If they are intact, start checking all the wires in the system: First start with the wires at the back of the gauge. Remove them, clean them and the terminals. Reattach. Use a continuity tester or 12v test light to check if the ground is good because grounds are the root of all gauge evil.
Check, clean all wires around the pump and solenoids. If the gauge works, perfect. If not, the gauge may be faulty.
I found the following post on another board which may help in your testing adventures:
you test the trim gauge by grounding out the send terminal on the gauge to see if it responds properly, you test the trim sender with an ohmmeter to see if the resistances are correct when the motor is in the UP and DOWN positions, you confirm continuity in the SEND wire between the sender and the gauge, and lastly you confirm that the sender and gauge are both properly grounded. These tests should tell you if you need to get a new gauge, a new sender, or just fix your existing wiring/ground connections.
For the speedometer pull the tube at the gauge and blow air to see if it is clogged.
Hope this helps.