Specifically, it is part of the Insular Celtic branch, which includes languages spoken on the islands of Britain and Ireland. The other Brittonic language is Cornish, and both are considered P-Celtic, meaning they retain the Proto-Celtic "p" sound in words that other Celtic languages changed to "k" or "kw".
While Welsh is not directly derived from any modern language, it descended from Common Brittonic, a language spoken throughout Britain before the arrival of the Anglo-Saxons. Common Brittonic itself ultimately derived from Proto-Celtic, the ancestor of all Celtic languages.