How do you attach a wooden gate to fence with metal posts?
You have numerous choices to deal with the gate hinge issue. For a round post you can clamp on this type of hinge and then bolt its flat plate to the gate:



Alternatively you could drill a horizontal hole through the metal post and install the bolt type hinge pin to be mated with the type of bolt on hinge strap in the second following picture:





A third option is to use the following U-bolt type hinge point mounted on the post. Then use a lag bolt hinge pin screwed into the gate framing: