First, I'd say there's no one answer to how or what people or a theoretical AI would do. The question at that level would be too wide-open to answer even if you had far more specifically detailed the situation. However if you're asking "might" this sort of thing happen plausibly in some sci fi situations, sure, and it already has.
The Wizard of Oz lacks AI but seems like a parallel to me.
I also immediately think of David Bowie's rather cool song Saviour Machine.
I also immediately think that there are some trends already in this direction. The complexity and stresses of the modern world have caused many of the roles of religion to be taken over by lay science, and even many scientists themselves get so deep into their own frame of reference that they tend to reject and accept some types of ideas out of hand rather than objectively. Then too there is the idea of human-like AI and even "the singularity" (which I think is hogwash but if enough people believe in it, they may attempt to engineer something like it). Even without "sentient" AI, there is complex AI, and we keep computerizing and networking more and more things, and are becoming and more dependent on computers. In the sense that you seem to mean religion, I think computers are already becoming this way. We already rely on computers for many crucial things, from landing airplanes to telling us how much money everyone has. Many people trust the idea that computerized driverless cars would be safer than human drivers and should replace them (LOL). There are already organizations which are mainly about controlling people, and they use computers, and as people offer programs which promise more and more advantages to using them to inform or even make decisions and model reality, it's already a kind of transition to looking to computers for what to believe and what to do.
The more cynical and devious an organization is, the more they might like computer systems to help them do what they already have to do through scheming, and they already design computer systems to figure out strategies to do so. (Source: See US Government "Requests For Proposals" for projects about computerized solutions for threat prediction, preemptive measures, winning hearts & minds, data mining, information warfare, etc.) It's a fairly natural extension of this (perverted and corrupt) way of thinking to develop AI systems that automate most of this, and then for them to reduce the amount of human involvement, adding capabilities until it's quite imaginable that, accidentally or not, one way or another, the machine might be pulling everyone's strings all by itself.
So for the details, it would depend on which group(s) started these computer systems, but if you start making AI systems designed to keep the people thinking and doing what you want, it would probably start with other domains first, particularly news and entertainment media, and the Internet. A natural (and perverted and corrupt) tactic would be to tap communications and infiltrate all social networks including religious organizations and communities. By tapping communications, corrupt and corruptible leaders can be identified and manipulated.
Now, I don't think it's likely that such a system would choose itself as its own symbol for worship by the population at large. It'd be much easier and safer to use actual people or human-oriented religions. However, the longer this went on, the more the AI might become more and more like a de facto god (in the religious population control sense), with humans obeying it and serving its needs and obeying its instructions without questioning them.
The population could (if desired) probably be swayed to accept the AI system itself at some point. For example, if the world has a series of catastrophes and then there is an amazing recovery and their safetly and needs and wants are suddenly provided for in a way no human government has ever been able to do, and then the government says, "Well, actually, we were just following the Saviour Machine 9000 program whose analysis told us what to do! It's truly a miraculous feat of computer science!" ... then I think people would tend to be happy to let this thing "lead them around by the nose", as you wrote.
Few might guess that the system might have actually engineered or at least enabled and/or capitalized upon the disasters as well as the solutions. The "scapegoat" metaphor comes from a religious practice, and has been updated by Hitler and others (e.g. how government capitalized on 9/11 and got people to accept secret courts and wiretapping "to protect our freedom").