it is not done by FIFA ranking. Here is how its done.
http://www.uefa.com/european-qualifiers/news/newsid=2506867.html
EDIT: For those too lazy to click the link, pertinent info:
All nine group winners qualify automatically. The eight best runners-up with the best records against the sides first, third, fourth and fifth in their groups go into the play-offs for UEFA's remaining four berths (the exclusion of results against sixth-placed sides was retained to alleviate any possible imbalance between the qualifying groups caused by the late introduction of Gibraltar and Kosovo).
With matches against the bottom side in the six-team groups discounted, the runners-up are ranked by the following criteria, in this order, as per FIFA competition regulations, article 20 paragraph 6, criteria a), b), c), then h) and i):
1 Highest number of points
2 Best goal difference
3 Highest number of goals scored
4 Fair play points (first yellow card -1pts; second yellow card/indirect red card -3pts; direct red card -4pts; yellow card, direct red card -5pts)
5 Drawing of lots