Pigment refers to compounds which lend color*. Extract does not have as solid a definition, but usually means that one particular molecule or group of related molecules which has been concentrated from some source, i.e vitamin-C extract from oranges would contain vitamin-C, but not necessarily have any color (pigment) to it from those oranges. However, flavonoid extract from oranges would be yellow in color because it is composed of the pigments which give oranges part of their color.
*In particular microscopic colored solid particles in contrast to dyes which are individual soluble molecules.