Getting XY Coordinates (Pick and Place file) from Gerber
The obvious answer is 'you can't'. Unless it's a very new gerber release (the X2) which is annotated with component infos. The only thing a gerber says is 'there is a pad here' and 'there is a track from there to that'. No pin number, no designators. In fact the text is drawn as lines.
If you had a D356 netlist it would be slightly better. With a lot of processing you could extract the pin 1 position and have an idea of the centroid (both are needed to program the PnP machine).
The alternative is using some CAM software to manually 'teach' the component position (usually you click between pads and the CAM latches on these), but a lot of hand fixing is needed anyway