According to the Ronald Reagan Presidential Library and Museum's archives (online here) the quotation is from a speech Ronald Reagan gave in 1986:
"Well, anyway, it's wonderful to be having this White House Conference on Small Business again after almost 6 years. Things certainly have changed in the meantime. Back then, government's view of the economy could be summed up in a few short phrases: If it moves, tax it. If it keeps moving, regulate it. And if it stops moving, subsidize it. Laughter Well, with your help, I think we've turned all that around."
What's that got to do with Reagan? Reagonomics was mostly about trimness and minimal government intervention: less spending, low corporate tax, deregulation. Subsidies of course went to the usual favourites.