The connection between oratory and rhetoric is that the former is a means of doing the latter. Rhetoric is the art of persuading others to agree with the speaker or to do what the speaker wants done. It is used to garner voters, to win elections, and to change opinions. Oratory is the ability to deliver speeches in public or in a closed meeting that has the same intended role as rhetoric. Important and talented orators include Cicero, Abraham Lincoln, and Martin Luther King, Jr.
Both oratory and rhetoric are deeply connected. This is because, in older times, oratory was the only means of delivering rhetoric. In more modern times, rhetoricians can publish their rhetoric in newspapers and books; as technology has advanced, speeches can also be delivered on the radio, on television, and even on the Internet.
Aristotle set out the definition and purpose of rhetoric: to provide a neutral case for persuading people to agree with the speaker. As oratory was, in Aristotle's time, the only means of performing rhetoric, it shared the same purpose and definition. The definition of rhetoric has since changed to include provocation against subjects and the total dissection of something rather than just an act of pure persuasion.
A substantial skill set is shared by both oratory and rhetoric. There are the five canons of rhetoric: invention, arrangement, style, memory, and delivery. Part of what separates oratory and rhetoric is that oratory requires the speaker to have a natural skill set, including charm and charisma as well as a good voice. Traditionally, an orator must master all the canons of rhetoric in order to become a rhetorician.
Oratory and rhetoric can exist as separate entities. If Aristotle's rules hold, then a speech that does not master the five canons or does not come from a neutral base is not rhetoric. While this may be true in the strictest sense, the lines between what is rhetoric and what is not has been blurred.
The art of public speaking — or oration — can include speeches that report on subjects or seek to discuss a particular subject, and such speeches are not attempts to persuade others. Lecturers seeking to educate students, for example, can be seen as great orators and speakers, but are not engaging in rhetoric as their job is to provide a variety of opinions.