Some opposition members walked out of the chamber before the vote in protest at the bill, which comes after years of delays linked to worries about gambling addiction and organised crime.
"The bill passed through the chamber and will be sent to the upper house by today," a parliamentary spokeswoman said.
The proposed legislation is all but assured to pass the upper house, which is also controlled by the ruling Liberal Democratic Party (LDP).
The LDP is expected to try to get to the bill passed quickly before the current parliamentary session ends on December 14.
Prime Minister Shinzo Abe and his party are betting that casinos can support tourism after Tokyo hosts the 2020 Olympics -- and pump some life into their faltering bid to boost the world's number three economy.
Supporters have said casinos could bring billions of dollars worth of investment, in a challenge to Asian gaming titan Macau.
Japan has long been viewed as a massive gaming market due to its wealthy population, close proximity to China and appetite for other forms of legal gambling, including horse and boat racing.
Pachinko, a slot machine-style game played in thousands of smoky parlours in every corner of Japan, is a huge revenue generator. Winnings can be exchanged off-site for cash, skirting gaming laws.
Osaka, Tokyo and nearby Yokohama have all been cited as possible locations for major resorts that would host casinos, hotels, convention centres and entertainment venues.
Brokerage CLSA estimates the casino market could be worth upwards of $30 billion a year, in addition to the sums already being spent.
"The world's leading operators regard Japan as a holy grail given the potential market size," Jay Defibaugh, a senior research analyst at CLSA, said in a report.
"Gambling industries in Japan, including pachinko and public gambling, such as horseracing, car racing, bicycle racing and boat racing, already generate in excess of US$30 bn in gross gaming revenue."
While legalising casinos would be a major step forward, many details would still have to be worked out and the analyst said a so-called integrated resort was not likely to be built before 2023.
Casinos do not have wide public support, largely due to concerns that betting parlours would aggravate crime and social problems.
The arrest of several professional baseball players for betting on their sport made headlines last year, while an Olympic badminton hopeful crashed out after admitting he gambled at an underground casino.
Japan's main opposition Democratic Party as well as some members of Komeito, the ruling party's junior coalition partner, have long opposed casinos.
After Tuesday's vote the Tokyo Shimbun newspaper warned casinos could have a "dramatic" negative impact on Japanese society.
Last week the top-selling, Yomiuri newspaper cautioned against rolling the dice on casinos.
"Gamblers' losses are what makes the casinos money," it said in an editorial.
"It's truly unhealthy to build a growth strategy on exploiting other people's misfortune and bad luck."