The history of gambling in the United Kingdom goes back centuries, as do efforts to deplore it, and regulate it.
Regulation.
Gambling was legal under English common law but the government worried that it interfered with military training. The Unlawful Games Act 1541 made virtually all gambling illegal. The law was never enforced, but it did mean that gambling debts could not be collected through court action. Additional acts of 1710, 1728, 1738, 1739, and 1744 focused on financial securities, illegal lotteries, and various popular gambling games. The Gaming Act 1845 legalized games of skill, made cheating a crime, simplified the regulation of gambling houses, and made gambling contracts legally unenforceable. Betting establishments became popular, despite new laws in 1853, 1854, 1874 and 1906. Bookmakers responded by hiring runners who were faster than the police. The Racecourse Betting Act of 1928 regulated betting on horse races, and the Betting and Lotteries Act 1934 took the greyhounds into account. Football pools became increasingly popular, and they were taxed through the Pool Betting Duty of 1947. The decline of the moralistic political forces led to the Betting and Gaming Act 1960 which legalized private casinos. The government set up its National Lottery in 1994.
Tudor and Stuart eras.
Spas such as Bath, Epsom, and Tunbridge Wells became popular after 1550 for the rich. They enjoyed lawn bowling and dancing, as well as medical benefits. Puritan pamphleteers such as Philip Stubbes warned that these "tubs of pleasure" made drinking, gambling, and illicit sex available to all visitors. 
Although Restoration England 1660–1689 featured a revulsion against Puritanism, gambling was seen as a stupid folly. Playwrights depicted gambling at dice, cards, and the tables as an aristocratic folly. After 1688 plays portrayed gambling more as vice than folly. Comedies and periodicals in the early 18th century portrayed gamblers disapprovingly.
Lotteries.
In 1566–1569 Queen Elizabeth launched England's first national public lottery to raise money to repair the harbors. However, only 10 percent of the 400,000 lots were purchased. Local elites were often hostile, because of distrust of the government and concerns about the immorality of gambling.
The lottery was promoted by scrolls posted throughout the country showing sketches of the prizes. The tickets were sold in 1566–1569, and the prize money was awarded in 1569, so each player got his money back and in effect was making an interest-free loan. In later decades, the government sold the lottery ticket rights to brokers, who in turn hired agents and runners to sell them. These brokers eventually became the modern day stockbrokers for various commercial ventures. Most people could not afford the entire cost of a lottery ticket, so the brokers would sell shares in a ticket; this resulted in tickets being issued with a notation such as "Sixteenth" or "Third Class".
Many private lotteries were held, including raising money for The Virginia Company of London to support its settlement in America at Jamestown. The English State Lottery ran from 1694 until 1826. Thus, the English lotteries ran for over 250 years, until the government, under constant pressure from the opposition in parliament, declared a final lottery in 1826. This lottery was held up to ridicule by contemporary commentators as "the last struggle of the speculators on public credulity for popularity to their last dying lottery".
Horse racing.
Horse racing has been a favorite sport and gambling venue since Tudor days. The earliest recorded races were two-horse matches held at Chester in 1539. King Charles II was an avid sportsman who gave Newmarket its prominence – he was a jockey in 1671 and built a palace there for his convenience. Ascot Racecourse started in 1711 under the patronage of Queen Anne. They involved multiple horses, with betting by the spectators. By 1750 the Jockey Club was formed to control the Newmarket, preventing dishonesty, and making for a level field. Epsom Derby began in 1780. The five classic races began with the St Leger Stakes in 1776. The system was complete in 1814 with five annual races. The availability of railways facilitated the rapid growth of the sport, making travel easy for the horses and running specials that attracted large audiences.
In the 18th century, horse racing became well-established. Newmarket and the Jockey Club set the standards but most of the racing took place for small cash prizes and enormous local prestige in landowners’ fields and in the rising towns. The system of wagering was essential to the funding and the growth of the industry, and all classes participated from the poor to royalty. High society was in control, and they made a special effort to keeping the riff-raff out and the criminal element away from the wagering. With real money at stake, the system needed skilled jockeys, trainers, grooms and experts at breeding, thereby opening new prestigious careers for working-class rural men. Every young ambitious stable boy could dream of becoming successful at their trade.
18th century.
The state lottery was a remarkable success in the 18th century, starting with the Queen Anne lotteries of 1710–14. This form of gambling combined the advantages of rational calculation and inexpensive fantasy with quick results. Unlike card games, there were no angry losers. Unlike racing, there was no behind the scenes fixing of outcomes. Lotteries brought in large sums to the Treasury, and thus provided the funding for numerous major wars. There were seven lottery loans from 1711 to 1714 in the reign of Queen Anne which yielded to the Government £9,000,000, minus the £2,734,000 paid to the winners And some overheads. Additional wars necessitated additional lotteries. Much larger sums were involved in the lotteries that financed the American war, 1775–1783.
Lotteries loosened the money pouches of previously uninvolved individuals. Frequent purchasers of lottery tickets were called 'adventurers', And then their friends were the center of untold conversations about what they would do with the fortunes they were about to win. Advertising for the lottery help funded fund the newspapers, and reports on the winner helped sell copies. Britain had succumbed to 'gambling mania'. With the defeat of Napoleon in 1815, Britain entered a century of peace, and lotteries were no longer necessary to finance wars. Government lotteries were abolished in 1826.
In the private sphere, distinctly different styles of gambling took place in the upper, middle and working classes. In the upper classes, gambling the family fortune was very common, with high-stakes and high losses--called "deep play". The venue was private clubs, which had an atmosphere that controlled against violence or vehement behavior. The most notorious case was the politician Charles James Fox In three years in his early 20s he ran up £120,000 of losses at the faro tables. Fox was a highly influential politician supported by very rich political allies who regularly covered his losses, but his political enemies rhetorically attacked his heavy losses.
In the middle class, a business orientation meant that recreational gambling at home was moderate, with limited stakes, and the goal of camaraderie and genial conversation rather than winning money. The middle classes rejected blood sports, and discovered that music, conversation and cards suited their taste for exercise of intellect and ability. Young people were allowed to play too, so they could learn to calculate quickly in their minds, and account for money lost and won. 
19th century.
Historian Andrew August finds that, "In the face of efforts of radicals and middle-class reformers, drink, gambling and raucous conviviality remained central to mid-Victorian working-class leisure." Before the railways, horse racing only attracted owners and a few people living near the tracks. Immediate information was essential to betting, and was only available at the racetracks. The telegraph disseminated the information instantly across Britain, and the railroad attracted audiences, and allowed the horses to be moved from place to place quickly. The number of active racing horses doubled between 1837 in 1869, prize money increased, and racing was now a national sport. Incomes were higher, leaving workers with more money to spend on drink, sex and gambling. About 150 betting houses served the working-class neighborhoods in London in the 1850s, accepting small bets, and making payoffs in a matter of minutes, allowing repeated betting on race days. When reformers made bidding houses illegal, the action moved to pubs and into the city streets. 
The better educated gamblers focused on racing, where random luck was less important and where skill, the assimilation of fresh information, and analysis of previous results provided an intellectual stimulus. Numerous sporting magazines appeared, reaching a total circulation of about 300,000 by the 1880s. The Sporting Times operated 1865–1932, with its distinctive salmon-colored paper immediately identifying a gambler. "Sporting Life" was the most popular, starting as a weekly in 1859 and becoming a daily in 1883. Horse racing was the core of its content, but it covered many other sports as well. It could not compete with the Internet and closed in 1998.
Gambling at cards in establishments popularly called casinos became the rage during the Victorian era. The evangelical and reform movements specifically targeted such establishments in their efforts to stop gambling, drinking, and prostitution.
Upper-class England gambled heavily, usually in swank private clubs in the St. James district of the West End of London.
20th century.
By the late 19th century, bookmakers could speed up betting cycle by using telegraphic results from racetracks so that city workers across the country could make multiple bets on racing day, absorb their losses or take their winnings and bet again in a matter of minutes. Bookmakers would set up a base in friendly pub, hire runners to tell what the odds were at this hour, collect bets, and pay off the winners, while lookouts warned about policeman. The Street Betting Act of 1906 was the counterattack by the moralistic middle-class which looked askance at this new form of gambling. The bets were small, but the excitement was high. The police were reluctant to enforce it, or could take a payoff for looking the other way. The working-class communities strongly supported the bookmakers who were providing entertainment and employment. The Betting and Gaming Act of 1960 finally legalized off-course betting. Turnover increased by 154% the next year, with over 13,000 licenses for betting shops in operation. Bingo is also legitimized.
Labour Party.
In the early 20th century the parliamentary Labour Party vigorously opposed off-track betting on horses using bookmakers. Middle class reformers were trying to shield the working class from evil and harmful effects, drawing upon ethical socialism, Nonconformist Puritanism, and secular puritanical values. Some Labour MPs laughed at this approach, but after 1920, with the rise of union influence on the Labour Party, the position changed to one of relative toleration and acceptance, using the slogan, "There Ought not to be One Law for the Rich and Another for the Poor which Is the Case Today." The laws were deliberately fashioned to control and restrict the working classes, and now they had a political vehicle to object. Deeply embedded in working-class culture was, "a boisterous proletarian lifestyle dominated by drunkenness, street-fighting, horse racing, boxing and gambling." These men were more comfortable with aristocratic Tories who gambled heavily in their upper-class clubs, as opposed to the middle class clergymen and philanthropists who ran the Liberal party. Furthermore, Constituency Labour Parties depended on lotteries and bingo for the revenue to keep operating and pay salaries to their full-time agents.
Greyhound racing.
Middle-class reformers were outraged, and the working-class delighted, with the emergence in the mid-1920s of an entertaining new sport and betting opportunity: Greyhound racing. At first it seemed modern, glamorous, and American, but the middle class lost interest when working-class audiences took over. 
Second World War.
The experience of total war 1939 to 1945 meant much less leisure and highly restricted transportation, So attendance fell at gambling venues such as racing tracks for horses and greyhounds. However the volume of betting remained high. Anti-gambling organizations used the national emergency to shut down many legitimate gambling activities, but the early successes in curtailing horse racing, greyhound racing and football-- which were the main venues for gambling-- were soon reversed as the government saw gambling as a necessary psychological outlet in a time of highly restricted leisure opportunities. There were new opportunities as well, such as 'unity' football pools and a larger number of illegal neighborhood bookmakers. For the first time there was heavy gambling on Irish horse races, which were not interrupted during the war. The government provided extra petrol needed