We introduce an approach based on the recently introduced functional mode analysis to identify collective modes of internal dynamics that maximally correlate to an external order parameter of functional interest. Input structural data can be either experimentally determined structure ensembles or simulated ensembles, such as molecular dynamics trajectories. Partial least-squares regression is shown to yield a robust solution to the multidimensional optimization problem, with a minimal and controllable risk of overfitting, as shown by extensive cross-validation. Several examples illustrate that the partial least-squares-based functional mode analysis successfully reveals the collective dynamics underlying the fluctuations in selected functional order parameters. Applications to T4 lysozyme, the Trp-cage, the aquaporin channels Aqy1 and hAQP1, and the CLC-ec1 chloride antiporter are presented in which the active site geometry, the hydrophobic solvent-accessible surface, channel gating dynamics, water permeability (p(f)), and a dihedral angle are defined as functional order parameters. The Aqy1 case reveals a gating mechanism that connects the inner channel gating residues with the protein surface, thereby providing an explanation of how the membrane may affect the channel. hAQP1 shows how the p(f) correlates with structural changes around the aromatic/arginine region of the pore. The CLC-ec1 application shows how local motions of the gating Glu(148) couple to a collective motion that affects ion affinity in the pore.