The crew of British battleships was so large, because, in part, because the ship required manning around the clock. The majority of the crew were divided into two watches, named port and starboard. These were further subdivided into two quarters, as only a quarter of the men needed to be on duty at any time when the ship was in harbour. The watches were on duty for four hours, then had four hours off. The one exception was the two dog watches, which were two hours long. The dog watches meant that men did not have to stand watch at the same time each day. However, there were exceptions to the watch system. The stokers (engine room crew) were divided into three watches. There were also daymen, which comprised groups such as the stewards, cooks and medical staff. These positions did not have to have someone on duty 24/7, and so were not divided into watches.
Each watch was divided into four main groups, the 'parts of the ship'. In a hangover from the warships of the age of sail, these were called the forecastle, foretop, maintop and quarterdeck. Each part was responsible for their particular area of the ship. When not in action, they would keep this area clean and tidy, as well as performing other routine duties. These other duties included look-out duty, manning the helm, maintaining the magazines, or manning the boats in case of man overboard. In Arctic waters, chipping ice off the armament and upperworks was nearly a full-time occupation. As a step-up from routine duties were special tasks. These included things like entering or leaving harbour, loading supplies and ammunition, or keeping watch over the anchor when moored. When danger threatened, but was not imminent, a portion of the armament had to be manned. How much of the armament was manned depended on how close the threat was. In the Mediterranean during WWII, it was not uncommon for the turret crews to sleep in their turrets. There were four states of readiness for both AA and anti-ship operations (LA). In the fourth state, only a quarter of the AA battery and one LA turret were manned. In the third state, known as defence stations, half the guns in the ship were manned. In the second degree, all of the guns were manned, but the men were allowed to rest, and groups of men were fallen out in turn. In the first degree, all men were at their quarters. Beyond manning the guns, there were other stations for men in action. Some manned the fire control directors, while a significant portion (including 75% of the two stoker off watches) formed damage control parties.
Manning the armament took up a significant portion of the ship's crew. The 16in turrets on the Nelson class battleships were manned by 93 men and one officer (the 15in turrets on Barham would have had roughly two-thirds this number, as they had two guns, not three). This included one gunners mate, fifteen gunnery ratings and two other seamen in the turret itself, along with the officer commanding the turret. The cordite handling room had seven gunnery ratings and nine other seamen, while the magazine itself had four gunnery ratings and 21 others. The shell room had 17 other seamen and eight gunnery ratings, with a gunners mate and eight gunnery ratings in the handling room. Barham also had a considerable secondary armament of twelve 6in guns in the casemates along her side. These had a crew of nine men, with a quarter gunner rating in charge, a gunlayer and trainer, and six men for miscellaneous duties - fetching ammunition and the like. The AA armament also required more men, with each of the ship's 40mm pom-pom guns requiring a crew of 2-4 men depending on the mounting. After gunnery, the engines were another major demand on men. The men who manned the engines were divided into two main groups: artificers, who were capable of doing skilled work, and stokers, who were semi-skilled. Artificers were highly trained in peacetime. Typically recruited at 16, they underwent a four year course at either Plymouth or Rosyth. This gave them wide and practical experience in maintaining and repairing all types of engines and fittings used by the RN. During the war, standards dropped somewhat so the numbers required could be met. Men were taken as artificers if they had at least 2.5 years experience in a relevant trade. Meanwhile stokers were, while less thoroughly trained, were expected to do the majority of the work. They tended the boilers, inspected the turbines and ran the pumps. On Barham, the engine room crew numbered roughly two hundred men. The seaman branch was responsible for most of the crew, but had relatively few duties. Skilled seamen would steer the ship, heave the lead or launch boats, but these duties were relatively rarely used - either only a few men were needed, like steering, or they were used intermittently. Seamen were typically used for menial tasks. Signallers also came out of the seaman branch, but were somewhat of a separate branch. Their job was to communicate between ships, using flags, semaphore and Morse code from signal lights. Telegraphists were responsible for the ship's radio communication, both maintaining and operating the radio sets. The next main group was the torpedo branch. This was a bit of a misnomer, as the torpedo branch was also responsible for the ship's electrical and telephone systems. As such, it was possible for a ship to have torpedomen aboard, but no torpedo armament. Barham, however, had both torpedoes and an electric system. The ship also had a number of miscellaneous ratings aboard. These included cooks (both officers' and ship's company), stewards, supply ratings and writers. As for officers, I've covered those here.
As to your second question, the manning requirements for ships have certainly gone down as technology has improved. For a simple comparison, we can compare HMS Illustrious from 1940 to her namesake from 1982. The first Illustrious had a crew compliment of 1,300 men, including her air group when originally commissioned, although this rose to just under 2,000 over the course of the war. The second, which was admittedly slightly smaller, had a crew compliment of 1,050. The main reason for this reduction comes from the increase in reliability and simplicity of the gas turbines in the new Illustrious, as well as reduced maintenance requirements and the reduced requirement for manning on the armament.
With your third question, each Royal Navy vessel carried a unit of Royal Marines. This was typically 200-350 men on a battleship, depending on class. The Marines manned one of the ship's turrets, as a result of the RN's tradition, while as mentioned above, the Marine band manned the transmitting station. The marines also served as sentries, as officers' servants and carried out routine shipboard duties. These men were ready and prepared to act as a landing party when necessary. However, this was rarely done, as to do so would significantly decrease the effectiveness of the ship's armaments. There were a few exceptions. During the invasion of Madagascar in May 1942, the marines from Ramillies were landed at Diego Suarez to serve as a diversion. During the Malaysian campaign, the marines from the sunken ships of Force Z formed a composite unit with the Argyll and Sutherland Highlanders who had taken heavy casualties during the campaign. This was dubbed Plymouth Argyll, a reference to the Plymouth Argyle football team. Beyond these, there were no cases where armed sailors were landed.