GA creates multiple solutions to a given problem and evolves them through many generations. Each solution holds all parameters that might help to enhance the results. For ANN, weights in all layers help in obtaining high accuracy. Thus, a single solution in GA will contain all weights in the ANN.
Usually, neurons are set out fully connected, so that every neuron in layer n is connected to everyone in layer n+1. The training process will sort out partial connectivity by training some weights down to zero, or very small numbers.
GA's are not guaranteed to calculate optimal weights. A trained network will provide you a balance between recognition and error. You could state "optimal weights" to achieve a target error.
For more information regarding the same, refer to the following link: https://pdfs.semanticscholar.org/593f/15ea0a4c1753ee33cfc4af1a317a2cda5e80.pdf