Can I get German citizenship if my ancestors left Germany before 1904?
tl;dr Usually not
German law said from 1871 to 1914 that Germans lost citizenship after living abroad for 10 years. The clock was reset to zero every time a German who lived abroad renewed their passport, registered with a German consulate, or visited Germany. This means your ancestors had to do one of those things at least once every 10 years until 1914 to keep German citizenship. If a husband/father lost German citizenship then his wife/minor children lost it with him. A woman would additionally also lose German citizenship if she married a foreigner. These rules applied to all Germans, including those who were born in Germany, who were born abroad, who were born before 1871, who were born after 1871, who were minors, who were adults, who naturalized in their new country, who did not naturalize in their new country, who identified as German, who spoke only German, who did not know that they lost German citizenship through living abroad for 10 years, who told the census worker that they were German, whose descendants still follow cherished German traditions generations later, and all other Germans.
Your best bet to find proof of visits to Germany are ship records: Bremen, New York, Philadelphia, familysearch.org (all free), ancestry.com (paid).
It is very unlikely that your ancestors registered at a German consulate or renewed their passport there. For example, 1/3 of Americans who live in the Midwestern United States have German heritage, but only 137 Germans registered at the German consulate in Chicago in the years 1877-1901, that is about 6 persons per year.
Possible reasons why your ancestors did not register at a German consulate: Your ancestors wanted to integrate into their new country and had no intention to keep their citizenship, there was no tangible benefit to keeping citizenship for them, they naturalized as US citizens and did not want to betray their Oath of Allegiance where they had sworn "that I absolutely and entirely renounce and abjure all allegiance and fidelity to any foreign prince, potentate, state, or sovereignty, of whom or which I have heretofore been a subject or citizen", they did not know that German citizenship could be lost due to living outside of Germany for 10 years after 1871 or that losing German citizenship could be prevented by registering at the consulate, it took a long time to travel to the nearest consulate before cars were invented, and records from many consulates were later stored in Berlin and destroyed during one or the other World War.
Germany does not have a central database where the government keeps track of every citizen. This means you can not find out when your ancestor lost German citizenship by requesting the information from such an office. You need to find the documents that prove your ancestor did not lose German citizenship if you want to apply for German citizenship by descent.
See also: Database of consular registrations