Luteolin fromPatrinia villosaexhibits strong antiviral activity. Here, the conditions for extracting and enriching luteolin fromP. villosawere optimized. Response surface methodology was used to determine the optimal extraction parameters in terms of reflux time, solvent ratio, extraction temperature, material-to-liquid ratio, and number of extractions. Thereafter, a macroporous resin method was used to enrich luteolin fromP. villosa. Finally, the following optimal extraction and enrichment conditions were established: an extraction time of 43.00 min, a methanol/hydrochloric acid solvent ratio of 13:1, an extraction temperature of 77.60 °C, a material/liquid ratio of 1:22, and a total of two extractions. NKA-9 was determined to be the most appropriate resin for enrichment. The ideal adsorption conditions were as follows: a pH of 5.0, a temperature of 25 °C, an initial luteolin concentration of 19.58 µg/mL, a sample loading volume of 2.9 BV, and a sample loading rate of 2 BV/h. The ideal desorption conditions were as follows: distilled water, 30% ethanol and 80% ethanol elution, and 5 BV at a flow rate of 2 BV/h. After optimization, the enrichment recovery rate was 80.06% and the luteolin content increased 3.8-fold. Additionally, the enriched product exhibited a significant inhibitory effect on PRV (Porcine pseudorabies virus) in vitro and in vivo, providing data for developing and applying luteolin fromP. villosa.